]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
[Patch obvious AArch64] Wrap SHIFT_COUNT_TRUNCATED in brackets
[gcc.git] / gcc / c / ChangeLog
CommitLineData
8fad45f5
MW
12016-05-16 Matthew Wahab <matthew.wahab@arm.com>
2
3 * c-decl.c (grokdeclarator): Remove errmsg and use of
4 targetm.invalid_return_type.
5 (grokparms): Remove errmsg and use of
6 targetm.invalid_parameter_type.
7
aa4b467b
JM
82016-05-13 Joseph Myers <joseph@codesourcery.com>
9
10 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
11 function return type.
12
4f2e1536
MP
132016-05-12 Marek Polacek <polacek@redhat.com>
14
15 PR c/70756
16 * c-decl.c (build_compound_literal): Pass LOC down to
17 c_incomplete_type_error.
18 * c-tree.h (require_complete_type): Adjust declaration.
19 (c_incomplete_type_error): Likewise.
20 * c-typeck.c (require_complete_type): Add location parameter, pass it
21 down to c_incomplete_type_error.
22 (c_incomplete_type_error): Add location parameter, pass it down to
23 error_at.
24 (build_component_ref): Pass location down to c_incomplete_type_error.
25 (default_conversion): Pass location down to require_complete_type.
26 (build_array_ref): Likewise.
27 (build_function_call_vec): Likewise.
28 (convert_arguments): Likewise.
29 (build_unary_op): Likewise.
30 (build_c_cast): Likewise.
31 (build_modify_expr): Likewise.
32 (convert_for_assignment): Likewise.
33 (c_finish_omp_clauses): Likewise.
34
d6e83a8d
MM
352016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
36
37 PR c/43651
38 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
39 is enabled.
40 * c-errors.c (pedwarn_c90): Return true if warned.
41 * c-tree.h (pedwarn_c90): Change return type to bool.
42 (enum c_declspec_word): Add new enumerator cdw_atomic.
43
5c3a10fb
MP
442016-05-11 Marek Polacek <polacek@redhat.com>
45
46 PR c++/71024
47 * c-decl.c (diagnose_mismatched_decls): Factor out code to
48 diagnose_mismatched_attributes and call it.
49
cf68d92c
MP
502016-05-10 Marek Polacek <polacek@redhat.com>
51
52 PR c/70255
53 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
54 on a declaration following the definition.
55
351f85c5
JJ
562016-05-05 Jakub Jelinek <jakub@redhat.com>
57
58 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
59 parse it through to c_parser_c99_block_statement.
60 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
61 caller.
62
deef7113
MP
632016-05-04 Marek Polacek <polacek@redhat.com>
64
65 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
66 OPT_Wdangling_else.
67
de55efd5
MP
682016-05-04 Marek Polacek <polacek@redhat.com>
69
70 PR c/48778
71 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
72 for macro expansions.
73
79ce98bc
MP
742016-05-03 Marek Polacek <polacek@redhat.com>
75
76 PR c/70859
77 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
78 check_builtin_function_arguments.
79
fb2647aa
RB
802016-05-03 Richard Biener <rguenther@suse.de>
81
82 * Make-lang.in (cc1-checksum.c): For stage-final re-use
83 the checksum from the previous stage.
84
77886428
CP
852016-05-02 Cesar Philippidis <cesar@codesourcery.com>
86
87 * c-parser.c (c_parser_oacc_all_clauses): Update call to
88 c_finish_omp_clauses.
89 (c_parser_omp_all_clauses): Likewise.
90 (c_parser_oacc_cache): Likewise.
91 (c_parser_oacc_loop): Likewise.
92 (omp_split_clauses): Likewise.
93 (c_parser_omp_declare_target): Likewise.
94 (c_parser_cilk_all_clauses): Likewise.
95 (c_parser_cilk_for): Likewise.
96 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
97 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
98
7176a4a0
MP
992016-05-02 Marek Polacek <polacek@redhat.com>
100
101 PR c/70851
102 * c-decl.c (grokdeclarator): Diagnose when array's size has an
103 incomplete type.
104
e7ff0319
CP
1052016-04-29 Cesar Philippidis <cesar@codesourcery.com>
106
107 PR middle-end/70626
108 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
109 OACC_LOOP_CLAUSE_MASK.
110 (c_parser_oacc_kernels_parallel): Update call to
111 c_oacc_split_loop_clauses.
112
9f405ce1
AM
1132016-04-28 Andrew MacLeod <amacleod@redhat.com>
114
115 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
116 argument to build_modify_expr in two cases.
117
c1e1f433
BS
1182016-04-27 Bernd Schmidt <bschmidt@redhat.com>
119
120 * c-parser.c (c_parser_postfix_expression_after_primary): Call
121 warn_for_memset instead of warning directly here.
122
2448a956
MP
1232016-04-26 Marek Polacek <polacek@redhat.com>
124
125 PR c/67784
126 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
127 out of ...
128 (c_parser_for_statement): ... here.
129 (c_parser_if_statement): Use it.
130 (c_parser_switch_statement): Use it.
131 (c_parser_while_statement): Use it.
132
b02a5e26
MP
133 PR c/70791
134 * c-decl.c (pushdecl): Pass LOCUS down to warning.
135
477d4906
IV
1362016-04-20 Ilya Verbin <ilya.verbin@intel.com>
137
138 PR c++/69363
139 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
140 instead of c_finish_cilk_clauses.
141 * c-tree.h (c_finish_omp_clauses): Add new default argument.
142 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
143 floating-point variables in the linear clause for Cilk Plus.
144
fe37c7af
MM
1452016-04-18 Michael Matz <matz@suse.de>
146
147 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
148 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
149
949505a9
MP
1502016-04-15 Marek Polacek <polacek@redhat.com>
151
152 PR c/70671
153 * c-typeck.c (build_unary_op): Pass location down to error and
154 warning call.
155
dda1bf61
JJ
1562016-04-15 Jakub Jelinek <jakub@redhat.com>
157
158 PR c/70436
159 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
160 where needed.
161 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
162 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
163 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
164 Adjust c_parser_pragma callers.
165 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
166 caller.
167 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
168 c_parser_statement.
169 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
170 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
171 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
172 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
173 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
174 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
175 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
176 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
177 down where needed.
178 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
179 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
180 calls.
181
99cd9857
MP
1822016-04-13 Marek Polacek <polacek@redhat.com>
183
184 PR c/70436
185 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
186 adjust callers.
187 (c_parser_statement): Likewise.
188 (c_parser_c99_block_statement): Likewise.
189 (c_parser_while_statement): Likewise.
190 (c_parser_for_statement): Likewise.
191 (c_parser_if_body): Don't set IF_P here.
192 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
193 about dangling else here.
194 * c-tree.h (c_finish_if_stmt): Adjust declaration.
195 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
196 warn about dangling else here.
197
f13355da
MP
1982016-04-04 Marek Polacek <polacek@redhat.com>
199
200 PR c/70307
201 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
202
5fde6a45
MP
2032016-03-31 Marek Polacek <polacek@redhat.com>
204
205 PR c/70297
206 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
207
4bbf545b
DM
2082016-03-18 David Malcolm <dmalcolm@redhat.com>
209
210 PR c/70281
211 * c-parser.c (c_parser_postfix_expression): Set the source range
212 for uses of "__builtin_types_compatible_p".
213
fcc2b74f
JJ
2142016-03-17 Jakub Jelinek <jakub@redhat.com>
215
216 PR c/70280
217 * c-typeck.c (composite_type): Don't count void_list_node
218 into len, if the list is terminated by void_list_node, start
219 with void_list_node instead of NULL for newargs. Stop
220 at void_list_node.
221
ab4c578f
MP
2222016-03-16 Marek Polacek <polacek@redhat.com>
223
224 PR c/70093
225 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
226 nested functions returning VM types.
227
96b3c82d
CP
2282016-03-09 Cesar Philippidis <cesar@codesourcery.com>
229
230 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
231 when calling c_finish_omp_clauses.
232
29b9828f
BS
2332016-03-04 Bernd Schmidt <bschmidt@redhat.com>
234
235 PR c/69824
236 * c-decl.c (get_parm_info): Don't queue implicit function declarations
237 for later.
238
7ff6ca38
MP
2392016-03-04 Marek Polacek <polacek@redhat.com>
240
241 PR c/69798
242 * c-parser.c (c_parser_postfix_expression): Call
243 c_parser_cast_expression rather than c_parser_postfix_expression.
244
686e2237
JJ
2452016-03-01 Jakub Jelinek <jakub@redhat.com>
246
247 PR c/69796
248 PR c/69974
249 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
250 of incomplete decls to error_mark_node.
251
0b05329b
MP
2522016-02-24 Marek Polacek <polacek@redhat.com>
253
254 PR c/69819
255 * c-decl.c (finish_decl): Don't update the copy of the type of a
256 different decl type.
257
067fbd8b
JJ
2582016-02-23 Jakub Jelinek <jakub@redhat.com>
259
260 PR objc/69844
261 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
262 in id_kind reclassification.
263
bf14eba2
JJ
2642016-02-16 Jakub Jelinek <jakub@redhat.com>
265
266 PR c/69835
267 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
268
ba539195
JN
2692016-02-16 James Norris <jnorris@codesourcery.com>
270
271 PR c/64748
272 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
273
16595a1f
BS
2742016-02-12 Bernd Schmidt <bschmidt@redhat.com>
275
f48dfe98
BS
276 * c-decl.c (build_null_declspecs): Zero the entire struct.
277
16595a1f
BS
278 PR c/69522
279 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
280 callers changed. If nested_p is true, use it to call
281 finish_implicit_inits.
282 * c-tree.h (finish_implicit_inits): Declare.
283 * c-typeck.c (finish_implicit_inits): New function. Move code
284 from ...
285 (push_init_level): ... here.
286 (set_designator, process_init_element): Call finish_implicit_inits.
287
66756373
JJ
2882016-02-11 Jakub Jelinek <jakub@redhat.com>
289
290 PR c/69768
291 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
292 arguments for -Waddress warning.
293
1066e9b5
JJ
2942016-02-04 Jakub Jelinek <jakub@redhat.com>
295
296 PR c/69669
297 * c-decl.c (finish_enum): When honoring mode attribute,
298 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
299
3a5d2ba4
JJ
3002016-01-29 Jakub Jelinek <jakub@redhat.com>
301
302 PR debug/69518
303 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
304 all type variants, not just TYPE_MAIN_VARIANT.
305
cbdd8ae0
JJ
3062016-01-27 Jakub Jelinek <jakub@redhat.com>
307
308 PR debug/66869
309 * c-decl.c (c_write_global_declarations_1): Warn with
310 warn_unused_function if static prototype without definition
311 is not C_DECL_USED.
312
fa74a4bc
MP
3132016-01-27 Marek Polacek <polacek@redhat.com>
314
315 PR c/68062
316 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
317 to unsigned, if needed. Add -Wsign-compare warning.
318
13f92e8d
JJ
3192016-01-26 Jakub Jelinek <jakub@redhat.com>
320
321 PR tree-optimization/69483
322 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
323
cd8e73dc 3242016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
325
326 PR c/24293
327 * c-tree.h (incomplete_record_decls): Declare.
328 * c-parser.c (incomplete_record_decls): Define.
329 (c_parser_translation_unit): Iterate through incomplete_record_decls and
330 report error if any decl has zero size.
331 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
332 or enum type to incomplete_record_decls.
333
e6d6ec9e
TV
3342016-01-14 Tom de Vries <tom@codesourcery.com>
335
336 PR tree-optimization/68773
337 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
338 set force_output.
339
00083992
MP
3402016-01-14 Marek Polacek <polacek@redhat.com>
341
342 PR c/69262
343 * c-decl.c (grokdeclarator): Provide more information for invalid
344 array declarations.
345
7443cf13
DM
3462016-01-06 David Malcolm <dmalcolm@redhat.com>
347
348 * c-parser.c (c_parser_unary_expression): For dereferences, build
349 a combined location before calling build_indirect_ref, so that
350 error reports cover the full range, manually updating the c_expr
351 src_range.
352
6b131d5b
MP
3532016-01-06 Marek Polacek <polacek@redhat.com>
354
355 PR sanitizer/69099
356 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
357 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
358 NULL.
359
818ab71a
JJ
3602016-01-04 Jakub Jelinek <jakub@redhat.com>
361
362 Update copyright years.
363
2fe0a208
MP
3642016-01-04 Marek Polacek <polacek@redhat.com>
365
366 PR c/68908
367 * c-typeck.c (build_atomic_assign): Improve commentary. Add
368 optimization to use __atomic_fetch_* built-in if possible.
369
c7b48c8a
TS
3702015-12-23 Thomas Schwinge <thomas@codesourcery.com>
371
372 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
373 into...
374 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
375 all users.
376
fda5652f
MP
3772015-12-22 Marek Polacek <polacek@redhat.com>
378
379 PR c/69002
380 * c-typeck.c (build_component_ref): Warn when acessing elements of
381 atomic structures or unions.
382
745e411d
DM
3832015-12-21 David Malcolm <dmalcolm@redhat.com>
384
385 * c-typeck.c: Include "gcc-rich-location.h".
386 (build_binary_op): In the two places that call binary_op_error,
387 create a gcc_rich_location and populate it with the location of
388 the binary op and its two operands.
389
94c40e19
DM
3902015-12-16 David Malcolm <dmalcolm@redhat.com>
391
392 * c-parser.c (c_parser_statement_after_labels): When calling
393 c_finish_return, Use the return expression's location if it has
394 one, falling back to the location of the first token within it.
395 * c-typeck.c (c_finish_return): When issuing warnings about
396 the incorrect presence/absence of a return value, issue a note
397 showing the declaration of the function.
398
de67c4c3
DM
3992015-12-16 David Malcolm <dmalcolm@redhat.com>
400
401 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
402 to 4.
403 (c_parser_peek_nth_token): New function.
404 (c_parser_peek_conflict_marker): New function.
405 (c_parser_error): Detect conflict markers and report them as such.
406
a10704e1
DM
4072015-12-16 David Malcolm <dmalcolm@redhat.com>
408
409 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
410 to preserve range information for the primary expression
411 in the call to c_parser_postfix_expression_after_primary.
412
8062bca6
DM
4132015-12-16 David Malcolm <dmalcolm@redhat.com>
414
415 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
416 expression location, falling back on the first token location,
417 rather than always using the latter.
418
d06f8b75
MP
4192015-12-16 Marek Polacek <polacek@redhat.com>
420
421 PR c/64637
422 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
423 available.
424
2994fb91
MP
4252015-12-15 Marek Polacek <polacek@redhat.com>
426
427 PR c/68907
428 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
429 artificial decl.
430
a1b93f8d
DM
4312015-12-08 David Malcolm <dmalcolm@redhat.com>
432
433 * c-parser.c (c_parser_alignof_expression): Capture location of
434 closing parenthesis (if any), or of end of unary expression, and
435 use it to build a src_range for the expression.
436
46c6e1e2
DM
4372015-12-08 David Malcolm <dmalcolm@redhat.com>
438
439 PR c/68757
440 * c-parser.c (c_parser_get_builtin_args): Add
441 "out_close_paren_loc" param, and write back to it.
442 (c_parser_postfix_expression): Capture the closing
443 parenthesis location for RID_CHOOSE_EXPR,
444 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
445 RID_BUILTIN_SHUFFLE and use it to set the source range
446 for such expressions; within RID_BUILTIN_COMPLEX set
447 the underlying location.
448
66189108
MP
4492015-12-07 Marek Polacek <polacek@redhat.com>
450
451 PR c/68668
452 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
453 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
454
f187980b
EB
4552015-12-04 Eric Botcazou <ebotcazou@adacore.com>
456
457 * c-tree.h (c_build_va_arg): Adjust prototype.
458 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
459 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
460 parameter, adjust throughout and issue an error if EXPR is a component
461 with reverse storage order.
462
4250754e
JM
4632015-12-02 Jason Merrill <jason@redhat.com>
464
465 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
466 (c_fully_fold_internal, decl_constant_value_for_optimization):
467 Move from c-common.c.
468 * c-tree.h: Declare decl_constant_value_for_optimization.
469 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
470
e9e32ee6
JM
4712015-12-02 Joseph Myers <joseph@codesourcery.com>
472
473 PR c/68162
474 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
475 following link from declarator to next declarator. Track original
476 qualified type and pass it to c_build_qualified_type.
477 * c-typeck.c (c_build_qualified_type): Add arguments
478 orig_qual_type and orig_qual_indirect.
479
ff7a55bf
TS
4802015-12-02 Thomas Schwinge <thomas@codesourcery.com>
481
482 * c-parser.c (c_parser_omp_clause_name)
483 (c_parser_oacc_all_clauses): Alphabetical sorting.
484
657e4e47
JJ
4852015-12-02 Jakub Jelinek <jakub@redhat.com>
486
487 PR c/68533
488 * c-decl.c (get_parm_info): Use b->locus instead of input_location
489 for diagnostics.
490
37d5ad46
JB
4912015-12-01 Julian Brown <julian@codesourcery.com>
492 Cesar Philippidis <cesar@codesourcery.com>
493 James Norris <James_Norris@mentor.com>
494
495 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
496 (c_parser_oacc_clause_use_device): New function.
497 (c_parser_oacc_all_clauses): Add use_device support.
498 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
499 (c_parser_oacc_host_data): New function.
500 (c_parser_omp_construct): Add host_data support.
501 * c-tree.h (c_finish_oacc_host_data): Add prototype.
502 * c-typeck.c (c_finish_oacc_host_data): New function.
503 (c_finish_omp_clauses): Add use_device support.
504
a4850ce9
JH
5052015-11-29 Jan Hubicka <hubicka@ucw.cz>
506
507 PR c/67106
508 * c-decl.c: Set TYPE_PACKED in variants.
509
b58d3df2
ML
5102015-11-27 Martin Liska <mliska@suse.cz>
511
512 PR c++/68312
513 * c-array-notation.c (fix_builtin_array_notation_fn):
514 Use release_vec_vec instead of vec::release.
515 (build_array_notation_expr): Likewise.
516 (fix_conditional_array_notations_1): Likewise.
517 (fix_array_notation_expr): Likewise.
518 (fix_array_notation_call_expr): Likewise.
519
aec17bfe
JJ
5202015-11-27 Jakub Jelinek <jakub@redhat.com>
521
522 PR c/63326
523 * c-parser.c (c_parser_compound_statement_nostart): If
524 last_label is true, use pragma_stmt instead of pragma_compound
525 as second c_parser_pragma argument.
526 (c_parser_omp_ordered, c_parser_omp_target_update,
527 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
528 false as second argument to c_parser_skip_to_pragma_eol after
529 diagnosing standalone directives used in pragma_stmt context.
530
688c4de0
IV
5312015-11-24 Ilya Verbin <ilya.verbin@intel.com>
532
533 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
534 with "if (ENABLE_OFFLOADING)".
535
cbd03aee
DM
5362015-11-23 David Malcolm <dmalcolm@redhat.com>
537
538 PR objc/68438
539 * c-parser.c (c_parser_postfix_expression): Set up source ranges
540 for various Objective-C constructs: Class.name syntax,
541 @selector(), @protocol(), @encode(), and [] message syntax.
542
a87a86e1
DM
5432015-11-20 David Malcolm <dmalcolm@redhat.com>
544
545 PR 62314
546 * c-typeck.c (should_suggest_deref_p): New function.
547 (build_component_ref): Special-case POINTER_TYPE when
548 generating a "not a structure of union" error message, and
549 suggest a "->" rather than a ".", providing a fix-it hint.
550
8ece8dfb
DM
5512015-11-19 David Malcolm <dmalcolm@redhat.com>
552
553 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
554 candidate into a new function, find_closest_identifier.
555
433068cc
MP
5562015-11-19 Marek Polacek <polacek@redhat.com>
557
558 PR c/68412
559 * c-typeck.c (parser_build_binary_op): Properly handle
560 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
561
bef08b71
DM
5622015-11-17 David Malcolm <dmalcolm@redhat.com>
563
564 * c-parser.c (set_c_expr_source_range): Bulletproof both
565 overloaded implementations against NULL expr->value.
566 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
567 values.
568 (c_parser_unary_expression): Likewise when handling addresses of
569 labels.
570 (c_parser_postfix_expression): Likewise for statement expressions,
571 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
572 __builtin_va_arg, and for __builtin_offset_of.
573 (c_parser_postfix_expression_after_paren_type): Initialize expr's
574 src_range using the range of the braced initializer.
575 (c_parser_transaction_expression): Set src_range for "ret" to a
576 sane pair of values.
577
fff77217
KY
5782015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
579
580 * c-parser.c (c_finish_omp_declare_simd): Look for
581 "simd" attribute as well. Update error message.
582
1d899da2
TS
5832015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
584
585 * c-parser.c (c_parser_omp_declare_target): Adjust.
586
e4606348
JJ
5872015-11-14 Jakub Jelinek <jakub@redhat.com>
588
589 * c-typeck.c (c_finish_omp_clauses): Don't mark
590 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
591
3e636daf
MP
5922015-11-14 Marek Polacek <polacek@redhat.com>
593
594 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
595 * c-typeck.c: Likewise.
596
ebedc9a3
DM
5972015-11-13 David Malcolm <dmalcolm@redhat.com>
598
599 * c-decl.c (warn_defaults_to): Pass line_table to
600 rich_location ctor.
601 * c-errors.c (pedwarn_c99): Likewise.
602 (pedwarn_c90): Likewise.
603 * c-parser.c (set_c_expr_source_range): New functions.
604 (c_token::get_range): New method.
605 (c_token::get_finish): New method.
606 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
607 based on the range from the start of the LHS to the end of the
608 RHS.
609 (c_parser_conditional_expression): Likewise, based on the range
610 from the start of the cond.value to the end of exp2.value.
611 (c_parser_binary_expression): Call set_c_expr_source_range on
612 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
613 (c_parser_cast_expression): Call set_c_expr_source_range on ret
614 based on the cast_loc through to the end of the expr.
615 (c_parser_unary_expression): Likewise, based on the
616 op_loc through to the end of op.
617 (c_parser_sizeof_expression) Likewise, based on the start of the
618 sizeof token through to either the closing paren or the end of
619 expr.
620 (c_parser_postfix_expression): Likewise, using the token range,
621 or from the open paren through to the close paren for
622 parenthesized expressions.
623 (c_parser_postfix_expression_after_primary): Likewise, for
624 various kinds of expression.
625 * c-tree.h (struct c_expr): Add field "src_range".
626 (c_expr::get_start): New method.
627 (c_expr::get_finish): New method.
628 (set_c_expr_source_range): New decls.
629 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
630 on ret for prefix unary ops.
631 (parser_build_binary_op): Likewise, running from the start of
632 arg1.value through to the end of arg2.value.
633
ec8b536f
MP
6342015-11-13 Marek Polacek <polacek@redhat.com>
635
636 PR c/68320
637 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
638
277fe616
DM
6392015-11-13 David Malcolm <dmalcolm@redhat.com>
640
641 * c-typeck.c: Include spellcheck.h.
642 (lookup_field_fuzzy_find_candidates): New function.
643 (lookup_field_fuzzy): New function.
644 (build_component_ref): If the field was not found, try using
645 lookup_field_fuzzy and potentially offer a suggestion.
646
6e232ba4
JN
6472015-11-12 James Norris <jnorris@codesourcery.com>
648 Joseph Myers <joseph@codesourcery.com>
649
650 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
651 (c_parser_omp_clause_name): Handle 'device_resident' clause.
652 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
653 and PRAGMA_OMP_CLAUSE_LINK.
654 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
655 and PRAGMA_OACC_CLAUSE_LINK.
656 (OACC_DECLARE_CLAUSE_MASK): New definition.
657 (c_parser_oacc_declare): New function.
658
9be4f715
MP
6592015-11-12 Marek Polacek <polacek@redhat.com>
660
661 PR c/67784
662 * c-parser.c (c_parser_for_statement): Reclassify the token in
663 a correct scope.
664
e78bede6
MP
6652015-11-11 Marek Polacek <polacek@redhat.com>
666
667 PR c/68107
668 PR c++/68266
669 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
670 checking the size of an array.
671
69f293c9
AM
6722015-11-11 Andrew MacLeod <amacleod@redhat.com>
673
674 * c-array-notation.c: Remove unused header files.
675 * c-aux-info.c: Likewise.
676 * c-convert.c: Likewise.
677 * c-decl.c: Likewise.
678 * c-errors.c: Likewise.
679 * c-lang.c: Likewise.
680 * c-objc-common.c: Likewise.
681 * c-parser.c: Likewise.
682 * c-typeck.c: Likewise.
683 * gccspec.c: Likewise.
684
3a40d81d
NS
6852015-11-09 Thomas Schwinge <thomas@codesourcery.com>
686 Cesar Philippidis <cesar@codesourcery.com>
687 James Norris <jnorris@codesourcery.com>
688 Julian Brown <julian@codesourcery.com>
689 Nathan Sidwell <nathan@codesourcery.com>
690
691 c/
692 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
693 routine arg.
694 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
695 (c_parser_pragma): Parse 'acc routine'.
696 (OACC_ROUTINE_CLAUSE_MARK): Define.
697 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
698
fc402eec
AA
6992015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
700
701 PR debug/67192
702 * c-typeck.c (c_finish_loop): For unconditional loops, set the
703 location of the backward-goto to the start of the loop body.
704
f6b0b3db
AA
7052015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
706
707 PR debug/67192
708 * c-parser.c (c_parser_while_statement): Finish the loop before
709 parsing ahead for misleading indentation.
710 (c_parser_for_statement): Likewise.
711
ee45a32d
EB
7122015-11-08 Eric Botcazou <ebotcazou@adacore.com>
713
714 * c-decl.c (finish_struct): If the structure has reverse storage
715 order, rewrite the type of array fields with scalar component. Call
716 maybe_apply_pragma_scalar_storage_order on entry.
717 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
718 errors on bit-fields and reverse SSO here and not...
719 (c_mark_addressable): ...here.
720 (output_init_element): Adjust call to initializer_constant_valid_p.
721 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
722
8a645150
DM
7232015-11-06 David Malcolm <dmalcolm@redhat.com>
724
725 * c-decl.c (warn_defaults_to): Update for change in signature
726 of diagnostic_set_info.
727 * c-errors.c (pedwarn_c99): Likewise.
728 (pedwarn_c90): Likewise.
729 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
730 for textinfo::set_location.
731
7a5e4956
CP
7322015-11-05 Cesar Philippidis <cesar@codesourcery.com>
733 Thomas Schwinge <thomas@codesourcery.com>
734 James Norris <jnorris@codesourcery.com>
735
736 * c-parser.c (c_parser_omp_clause_name): Add support for
737 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
738 (c_parser_omp_clause_default): Add is_oacc argument. Handle
739 default(none) in OpenACC.
740 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
741 arguments.
742 (c_parser_oacc_clause_tile): New function.
743 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
744 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
745 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
746 TILE}.
747 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
748 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
749 FIRSTPRIVATE}.
750 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
751 (c_parser_oacc_update): Update the error message for missing clauses.
752 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
753 and OMP_CLAUSE_INDEPENDENT.
754
bfcfbfa0
MP
7552015-11-05 Marek Polacek <polacek@redhat.com>
756
757 PR c/68090
758 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
759 deal with pre-evaluation on invalid types.
760
e01d41e5
JJ
7612015-11-05 Jakub Jelinek <jakub@redhat.com>
762 Ilya Verbin <ilya.verbin@intel.com>
763
764 * c-parser.c: Include context.h and gimple-expr.h.
765 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
766 monotonic together with nonmonotonic.
767 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
768 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
769 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
770 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
771 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
772 expressions on combined target teams before the target.
773 (c_parser_omp_declare_target): If decl has "omp declare target" or
774 "omp declare target link" attribute, and cgraph or varpool node already
775 exists, then set corresponding flags. Call c_finish_omp_clauses
776 in the parenthesized extended-list syntax case.
777 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
778 declare target.
779 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
780 on OMP_CLAUSE_REDUCTION array sections.
781 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
782 into the constant offset, or for variable low-bound using
783 POINTER_PLUS_EXPR. For structure element based array sections use
784 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
785 (c_finish_omp_clauses): Drop generic_field_head, structure
786 elements are now always mapped even as array section bases,
787 diagnose same var in data sharing and mapping clauses. Diagnose if
788 linear step on declare simd is neither a constant nor a uniform
789 parameter. Look through POINTER_PLUS_EXPR for array section
790 reductions. Diagnose the same var or function appearing multiple
791 times on the same directive. Fix up wording for the to clause if t
792 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
793 modifier on kinds other than dynamic or guided or nonmonotonic
794 modifier together with ordered clause.
795
4bf9e5a8
TS
7962015-11-03 Thomas Schwinge <thomas@codesourcery.com>
797 Chung-Lin Tang <cltang@codesourcery.com>
798
799 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
800
2adfab87
AM
8012015-10-29 Andrew MacLeod <amacleod@redhat.com>
802
803 * c-array-notation.c: Reorder #include's and remove duplicates.
804 * c-aux-info.c: Likewise.
805 * c-convert.c: Likewise.
806 * c-decl.c: Likewise.
807 * c-errors.c: Likewise.
808 * c-lang.c: Likewise.
809 * c-objc-common.c: Likewise.
810 * c-parser.c: Likewise.
811 * c-typeck.c: Likewise.
812
e922069e
JW
8132015-10-26 Jim Wilson <jim.wilson@linaro.org>
814
815 PR debug/66068
816 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
817 after calling build_qualified_type.
818
765dd391
CP
8192015-10-27 Cesar Philippidis <cesar@codesourcery.com>
820 Thomas Schwinge <thomas@codesourcery.com>
821 James Norris <jnorris@codesourcery.com>
822 Joseph Myers <joseph@codesourcery.com>
823 Julian Brown <julian@codesourcery.com>
824 Bernd Schmidt <bschmidt@redhat.com>
825
826 * c-parser.c (c_parser_oacc_shape_clause): New.
827 (c_parser_oacc_simple_clause): New.
828 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
829 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
830
88bae6f4
TS
8312015-10-27 Thomas Schwinge <thomas@codesourcery.com>
832 James Norris <jnorris@codesourcery.com>
833 Cesar Philippidis <cesar@codesourcery.com>
834
835 PR c/64765
836 PR c/64880
837 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
838 parameters, and handle these. Adjust all users.
839 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
840 into...
841 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
842 all users.
843 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
844 declare functions.
845 (c_finish_omp_construct): Declare function.
846 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
847 Merge functions into...
848 (c_finish_omp_construct): ... this new function.
849
a8fc2579
RB
8502015-10-22 Richard Biener <rguenther@suse.de>
851
852 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
853 before folding a MINUS_EXPR.
854
e9122ef6
MP
8552015-10-21 Marek Polacek <polacek@redhat.com>
856
857 PR c/68024
858 * c-decl.c (start_function): Warn about vararg functions without
859 a prototype.
860
9f47c7e5
IE
8612015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
862
863 * c-typeck.c (build_conditional_expr): Use boolean vector
864 type for vector comparison.
865 (build_vec_cmp): New.
866 (build_binary_op): Use build_vec_cmp for comparison.
867
fa60eeb9
MP
8682015-10-20 Marek Polacek <polacek@redhat.com>
869
870 * c-parser.c (is_cilkplus_vector_p): Don't define here.
871
2c7020eb
MP
8722015-10-20 Marek Polacek <polacek@redhat.com>
873
874 PR c/67964
875 * c-parser.c (c_parser_attributes): Break out of the loop if the
876 token after an attribute isn't a comma.
877
d9a6bd32
JJ
8782015-10-13 Jakub Jelinek <jakub@redhat.com>
879 Aldy Hernandez <aldyh@redhat.com>
880
881 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
882 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
883 (c_parser_omp_variable_list): Handle structure elements for
884 map, to and from clauses. Handle array sections in reduction
885 clause. Formatting fixes.
886 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
887 if clause modifiers.
888 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
889 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
890 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
891 c_parser_omp_clause_is_device_ptr): New functions.
892 (c_parser_omp_clause_ordered): Parse optional parameter.
893 (c_parser_omp_clause_reduction): Handle array reductions.
894 (c_parser_omp_clause_schedule): Parse optional simd modifier.
895 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
896 functions.
897 (c_parser_omp_clause_linear): Parse linear clause modifiers.
898 (c_parser_omp_clause_depend_sink): New function.
899 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
900 (c_parser_omp_clause_map): Parse release/delete map kinds and
901 optional always modifier.
902 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
903 and c_finish_omp_clauses callers.
904 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
905 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
906 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
907 (OMP_CRITICAL_CLAUSE_MASK): Define.
908 (c_parser_omp_critical): Parse critical clauses.
909 (c_parser_omp_for_loop): Handle doacross loops, adjust
910 c_finish_omp_for and c_finish_omp_clauses callers.
911 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
912 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
913 (OMP_FOR_CLAUSE_MASK): Add linear clause.
914 (c_parser_omp_for): Disallow ordered clause when combined with
915 distribute. Disallow linear clause when combined with distribute
916 and not combined with simd.
917 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
918 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
919 parse clauses and if depend clause is found, don't parse a body.
920 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
921 Allow target parallel without for after it.
922 (OMP_TASK_CLAUSE_MASK): Add priority clause.
923 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
924 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
925 invalid kinds.
926 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
927 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
928 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
929 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
930 functions.
931 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
932 defaultmap and is_device_ptr clauses.
933 (c_parser_omp_target): Parse target parallel and target simd. Set
934 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
935 and target exit data. Diagnose invalid map kinds.
936 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
937 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
938 construct.
939 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
940 &omp_priv.
941 (OMP_TASKLOOP_CLAUSE_MASK): Define.
942 (c_parser_omp_taskloop): New function.
943 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
944 handle PRAGMA_OMP_TASKLOOP.
945 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
946 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
947 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
948 Add IS_OMP argument, handle structure element bases, diagnose
949 bitfields, pass IS_OMP recursively, diagnose known zero length
950 array sections in depend clauses, handle array sections in reduction
951 clause, diagnose negative length even for pointers.
952 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
953 types, pass IS_OMP down to handle_omp_array_sections_1, handle
954 array sections in reduction clause, set
955 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
956 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
957 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
958 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
959
21ba0cea
MP
9602015-10-06 Marek Polacek <polacek@redhat.com>
961
962 * c-parser.c (c_parser_statement_after_labels): Use
963 protected_set_expr_location.
964 (c_parser_omp_clause_num_gangs): Likewise.
965 (c_parser_omp_clause_num_threads): Likewise.
966 (c_parser_omp_clause_num_workers): Likewise.
967 (c_parser_omp_clause_vector_length): Likewise.
968 (c_parser_omp_clause_num_teams): Likewise.
969 (c_parser_omp_clause_thread_limit): Likewise.
970 * c-typeck.c (build_c_cast): Likewise.
971 (c_cast_expr): Likewise.
972
624d31fe
RS
9732015-10-05 Richard Sandiford <richard.sandiford@arm.com>
974
975 * c-typeck.c (c_tree_equal): Use real_equal instead of
976 REAL_VALUES_EQUAL.
977
b8fd7909
JM
9782015-10-04 Jason Merrill <jason@redhat.com>
979
980 * c-parser.c (c_lex_one_token): Handle @synchronized.
981 * c-decl.c (match_builtin_function_types): A declaration of a built-in
982 can change whether the function is transaction_safe.
983
1c7485af
MP
9842015-10-02 Marek Polacek <polacek@redhat.com>
985
986 PR c/67730
987 * c-typeck.c (convert_for_assignment): Use the expansion point
988 location throughout.
989
3e3b8d63
MP
9902015-10-02 Marek Polacek <polacek@redhat.com>
991
992 PR c/64249
993 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
994 and pass it down to c_parser_if_statement.
995 (c_parser_else_body): Add CHAIN parameter and pass it down to
996 c_parser_statement_after_labels.
997 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
998 duplicated if-else-if conditions.
999
aabef2de
MP
10002015-10-01 Marek Polacek <polacek@redhat.com>
1001
1002 * c-typeck.c (convert_for_assignment): Improve commentary.
1003
de8ddd5f
MP
10042015-09-30 Marek Polacek <polacek@redhat.com>
1005
1006 PR c/67730
1007 * c-typeck.c (c_finish_return): Use the expansion point location for
1008 certain "return with value" warnings.
1009
c4914de6
MLI
10102015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1011
1012 * c-parser.c (pragma_lex): Add loc argument.
1013
0e36f5c7
MP
10142015-09-15 Marek Polacek <polacek@redhat.com>
1015
1016 PR c/67580
1017 * c-decl.c (tag_exists_p): New function.
1018 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1019 struct/union/enum keywords are missing.
1020 * c-tree.h (tag_exists_p): Declare.
1021
2f3bb934
MP
10222015-09-15 Marek Polacek <polacek@redhat.com>
1023
1024 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1025 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1026 Return NULL_TREE instead of 0.
1027 (lookup_name): Return NULL_TREE instead of 0.
1028 (lookup_name_in_scope): Likewise.
1029 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1030 (parser_xref_tag): Use false instead of 0.
1031 (start_struct): Use true instead of 1.
1032 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1033
aa256c4a
MP
10342015-09-14 Marek Polacek <polacek@redhat.com>
1035
1036 * c-typeck.c (set_nonincremental_init_from_string): Use
1037 HOST_WIDE_INT_M1U when shifting a negative value.
1038
dbb68221
MW
10392015-09-09 Mark Wielaard <mjw@redhat.com>
1040
1041 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1042 parm against NULL.
1043
a8a098ac
JJ
10442015-09-10 Jakub Jelinek <jakub@redhat.com>
1045
1046 PR c/67502
1047 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1048 into OMP_FOR_PRE_BODY rather than before the loop.
1049
f4b189d5
JJ
10502015-09-09 Jakub Jelinek <jakub@redhat.com>
1051
0bb99c11
JJ
1052 PR c/67501
1053 * c-parser.c (c_parser_oacc_all_clauses,
1054 c_parser_omp_all_clauses): Remove invalid clause from
1055 list of clauses even if parser->error is set.
1056
fce5e5e3
JJ
1057 PR c/67500
1058 * c-parser.c (c_parser_omp_clause_aligned,
1059 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1060 test for errors.
1061 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1062 error_mark_node.
1063
f4b189d5
JJ
1064 PR c/67495
1065 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1066 instead of c_parser_unary_expression. If the result is !lvalue_p,
1067 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1068
b2aaf235
MP
10692015-09-04 Marek Polacek <polacek@redhat.com>
1070
1071 PR sanitizer/67279
1072 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1073
1807ffc1
MS
10742015-09-03 Martin Sebor <msebor@redhat.com>
1075
1076 PR c/66516
8b652e65
JJ
1077 * c-typeck.c (convert_arguments, parser_build_unary_op,
1078 build_conditional_expr, c_cast_expr, convert_for_assignment,
1079 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1080 reject_gcc_builtin.
1081 (c_decl_implicit): Define.
1082
d04ff417
MP
10832015-09-02 Marek Polacek <polacek@redhat.com>
1084
1085 PR c/67432
1086 * c-parser.c (c_parser_enum_specifier): Give a better error for
1087 an empty enum.
1088
a79683d5
TS
10892015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1090
1091 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1092
191a6b94
MP
10932015-08-12 Marek Polacek <polacek@redhat.com>
1094
1095 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1096 LOC to it.
1097
420a9d9b
MP
10982015-08-03 Marek Polacek <polacek@redhat.com>
1099
1100 PR c/67088
1101 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1102 Use it.
1103 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1104
992118a1
PP
11052015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1106
1107 * c-parser.c (c_parser_if_body): Take token_indent_info
1108 argument. Call warn_for_misleading_indentation even when the
1109 body is a semicolon. Extract token_indent_infos corresponding
1110 to the guard, body and next tokens. Adjust call to
1111 warn_for_misleading_indentation accordingly.
1112 (c_parser_else_body): Likewise.
1113 (c_parser_if_statement): Likewise.
1114 (c_parser_while_statement): Likewise.
1115 (c_parser_for_statement): Likewise.
1116
46308474
LFSM
11172015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1118 Manuel López-Ibáñez <manu@gcc.gnu.org>
1119
1120 * c-decl.c (get_parm_info): Remove static var. Update warning
1121 message.
1122
05b28fd6
MP
11232015-07-27 Marek Polacek <polacek@redhat.com>
1124
1125 PR c++/66555
1126 PR c/54979
1127 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1128
451b5e48
MP
11292015-07-20 Marek Polacek <polacek@redhat.com>
1130
1131 PR c++/55095
1132 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1133 (build_binary_op): Warn about left shift overflows.
1134
1916bcb5
AM
11352015-07-09 Andrew MacLeod <amacleod@redhat.com>
1136
1137 * c-array-notation.c: Adjust includes for flags.h changes.
1138 * c-objc-common.c: Likewise.
1139
c7131fb2
AM
11402015-07-07 Andrew MacLeod <amacleod@redhat.com>
1141
1142 * c-array-notation.c: Adjust includes.
1143 * c-aux-info.c: Likewise.
1144 * c-convert.c: Likewise.
1145 * c-decl.c: Likewise.
1146 * c-errors.c: Likewise.
1147 * c-lang.c: Likewise.
1148 * c-objc-common.c: Likewise.
1149 * c-parser.c: Likewise.
1150 * c-typeck.c: Likewise.
1151
da2e71c9
MLI
11522015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1153
1154 PR fortran/66605
1155 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1156
b155cfd9
MP
11572015-06-29 Marek Polacek <polacek@redhat.com>
1158
1159 PR c/66322
1160 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1161 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1162 about -Wswitch-bool here.
1163 (do_case): Update c_add_case_label call.
1164 (c_finish_case): Update c_do_switch_warnings call.
1165
31521951
MP
11662015-06-27 Marek Polacek <polacek@redhat.com>
1167
1168 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1169
22d03525
MP
11702015-06-26 Marek Polacek <polacek@redhat.com>
1171
1172 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1173 INDIRECT_REF_P.
1174 * c-typeck.c (array_to_pointer_conversion): Likewise.
1175 (build_unary_op): Likewise.
1176 (c_finish_return): Likewise.
1177
f0889939
AM
11782015-06-25 Andrew MacLeod <amacleod@redhat.com>
1179
1180 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1181 * c-parser.c: Likewise.
1182
8d67ee55
RS
11832015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1184
1185 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1186 instead of pointer_hash.
1187 (detect_field_duplicates): Likewise.
1188
0ae9bd27
MP
11892015-06-25 Marek Polacek <polacek@redhat.com>
1190
1191 * c-array-notation.c: Use VAR_P throughout.
1192 * c-decl.c: Likewise.
1193 * c-objc-common.c: Likewise.
1194 * c-parser.c: Likewise.
1195 * c-typeck.c: Likewise.
1196
62f9079a
MP
11972015-06-25 Marek Polacek <polacek@redhat.com>
1198
1199 * c-decl.c: Use is_global_var throughout.
1200 * c-parser.c: Likewise.
1201 * c-typeck.c: Likewise.
1202
abb226c9
AM
12032015-06-17 Andrew MacLeod <amacleod@redhat.com>
1204
1205 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1206 * c-aux-info.c: Likewise.
1207 * c-convert.c: Likewise.
1208 * c-decl.c: Likewise.
1209 * c-errors.c: Likewise.
1210 * c-lang.c: Likewise.
1211 * c-objc-common.c: Likewise.
1212 * c-parser.c: Likewise.
1213 * c-typeck.c: Likewise.
1214
8cbababc
JH
12152015-06-11 Jan Hubicka <hubicka@ucw.cz>
1216
1217 PR middle-end/66325
1218 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1219 variants.
1220
a0349665
PMR
12212015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1222
1223 * c-decl.c (pop_scope): Register the main translation unit
1224 through the new debug hook.
1225
13fdf2e2
AM
12262015-06-08 Andrew MacLeod <amacleod@redhat.com>
1227
1228 * c-array-notation.c : Adjust include files.
1229 * c-aux-info.c : Likewise.
1230 * c-convert.c : Likewise.
1231 * c-decl.c : Likewise.
1232 * c-errors.c : Likewise.
1233 * c-lang.c : Likewise.
1234 * c-lang.h : Likewise.
1235 * c-objc-common.c : Likewise.
1236 * c-parser.c : Likewise.
1237 * c-typeck.c : Likewise.
1238
d7438551
AH
12392015-06-05 Aldy Hernandez <aldyh@redhat.com>
1240
1241 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1242 immediately clobber it.
1243 (c_write_global_declarations_1): Remove call to
1244 check_global_declaration_1.
1245 (c_write_global_declarations_2): Remove.
1246 (c_write_final_cleanups): Rename from c_write_global_declarations.
1247 Remove call to finalize_compilation_unit.
1248 Remove calls to debugging hooks.
1249 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1250 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1251 * c-tree.h: Remove c_write_global_declarations.
1252
ecb9f223
AM
12532015-06-04 Andrew MacLeod <amacleod@redhat.com>
1254
1255 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1256 * c-aux-info.c: Likewise.
1257 * c-convert.c: Likewise.
1258 * c-decl.c: Likewise.
1259 * c-errors.c: Likewise.
1260 * c-lang.c: Likewise.
1261 * c-objc-common.c: Likewise.
1262 * c-parser.c: Likewise.
1263 * c-typeck.c: Likewise.
1264
9482b620
MP
12652015-06-04 Marek Polacek <polacek@redhat.com>
1266
1267 PR c/66341
1268 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1269 it is a lvalue.
1270
bc51ace3
PK
12712015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1272
1273 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1274 Warn for empty struct.
1275 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1276
ea5b45b6
AT
12772015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1278
1279 * c-decl.c (start_function): Call plugin before parsing.
1280 (finish_function): Call plugin after parsing.
1281
c2d47482
PK
12822015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1283
1284 PR c/49551
1285 * c-decl.c (merge_decls): Merge DECL_COMMON.
1286
a95492ab
JW
12872015-05-22 Jim Wilson <jim.wilson@linaro.org>
1288
1289 * Make-lang.in (check_gcc_pallelize): Define.
1290
fd5c817a
MP
12912015-05-22 Marek Polacek <polacek@redhat.com>
1292
1293 PR c/47043
1294 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1295 attributes.
1296
c7b70a3c
MP
12972015-05-21 Marek Polacek <polacek@redhat.com>
1298
1299 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1300 DECL_BUILT_IN.
1301
21b634ae
MP
13022015-05-20 Marek Polacek <polacek@redhat.com>
1303
1304 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1305 * c-typeck.c: Likewise.
1306
296a8c2f
MP
13072015-05-19 Marek Polacek <polacek@redhat.com>
1308
1309 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1310
41b37d5e
JJ
13112015-05-19 Jakub Jelinek <jakub@redhat.com>
1312
1313 PR middle-end/66199
1314 * c-parser.c (c_parser_omp_for_loop): Don't add
1315 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1316 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1317 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1318 constructs.
1319
fab27f52
MM
13202015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1321
1322 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1323 swaps.
fab27f52 1324
40de31cf
MLI
13252015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1326
1327 PR fortran/44054
1328 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1329 accessor function.
1330
3aa3c9fc
MP
13312015-05-14 Marek Polacek <polacek@redhat.com>
1332
1333 PR c/66066
1334 PR c/66127
1335 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1336 rather than with 0.
1337
c3388e62
DM
13382015-05-12 David Malcolm <dmalcolm@redhat.com>
1339
1340 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1341 to add a call to warn_for_misleading_indentation.
1342 (c_parser_else_body): Likewise, adding param "else_loc".
1343 (c_parser_if_statement): Check for misleading indentation.
1344 (c_parser_while_statement): Likewise.
1345 (c_parser_for_statement): Likewise.
1346
755e528f
MP
13472015-05-08 Marek Polacek <polacek@redhat.com>
1348
1349 PR c/64918
1350 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1351 (output_init_element): Likewise.
1352
0173bd2a
MP
13532015-05-07 Marek Polacek <polacek@redhat.com>
1354
1355 PR c/65179
1356 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1357 value.
1358
9babc352
MP
13592015-04-30 Marek Polacek <polacek@redhat.com>
1360
1361 * c-typeck.c (set_init_label): Call error_at instead of error and
1362 pass LOC to it.
1363
ac9f18db
MP
1364 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1365 the type of a decl.
1366
ec3fba51
MP
1367 * c-typeck.c (c_build_va_arg): Clarify the error message.
1368
b811915d
TS
13692015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1370
1371 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1372 OMP_STANDALONE_CLAUSES.
1373
f3075008
MP
13742015-04-28 Marek Polacek <polacek@redhat.com>
1375
1376 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1377
4e81b788
MP
13782015-04-28 Marek Polacek <polacek@redhat.com>
1379
1380 PR c/65901
1381 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1382
6c1db78e
MP
13832015-04-25 Marek Polacek <polacek@redhat.com>
1384
1385 PR c/52085
1386 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1387 attribute.
1388
5c4abbb8
MP
13892015-04-23 Marek Polacek <polacek@redhat.com>
1390
1391 PR c/65345
1392 * c-decl.c (set_labels_context_r): New function.
1393 (store_parm_decls): Call it via walk_tree_without_duplicates.
1394 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1395 instead of create_tmp_var. Build TARGET_EXPR instead of
1396 COMPOUND_EXPR.
1397 (build_atomic_assign): Use create_tmp_var_raw instead of
1398 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1399
06aca1d5
IV
14002015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1401
1402 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1403 (c_parser_omp_target_update): Add missed %> to error_at ().
1404
8fba1830
BRF
14052015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1406
1407 PR target/55143
1408 * c-decl.c (c_default_pointer_mode): Remove definition.
1409 * c-tree.h (c_default_pointer_mode): Remove declaration.
1410
62021f64
TB
14112015-03-27 Tobias Burnus <burnus@net-b.de>
1412
1413 PR c/65586
1414 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1415 error out.
1416 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1417 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1418 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1419
9b65e171
JJ
14202015-03-19 Jakub Jelinek <jakub@redhat.com>
1421
1422 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1423 attribute for DECL_EXTERNAL VAR_DECLs.
1424
17958621
JJ
14252015-03-11 Jakub Jelinek <jakub@redhat.com>
1426
1427 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1428 argument.
1429
7ccb1a11
JJ
14302015-03-10 Jakub Jelinek <jakub@redhat.com>
1431
1432 PR c/65120
1433 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1434 before preparing arguments to warn_logical_not_parentheses.
1435
01177669
JJ
14362015-03-09 Jakub Jelinek <jakub@redhat.com>
1437
1438 PR c/65120
1439 * c-typeck.c (parser_build_binary_op): Don't warn for
1440 !!x == y or !b == y where b is _Bool.
1441
802ac282
MP
14422015-03-09 Marek Polacek <polacek@redhat.com>
1443
1444 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1445 * c-decl.c (grokdeclarator): Likewise.
1446 * c-typeck.c (build_binary_op): Likewise.
1447
e5165b60
MP
14482015-02-27 Marek Polacek <polacek@redhat.com>
1449
1450 PR c/65228
1451 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1452
065d214c
MP
14532015-02-14 Marek Polacek <polacek@redhat.com>
1454
1455 PR c/64768
1456 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1457 declared through a typedef name.
1458
e5d9235b
MP
14592015-02-13 Marek Polacek <polacek@redhat.com>
1460
1461 PR c/65050
1462 * c-decl.c (grokdeclarator): Print also the type when giving
1463 the error message about array's incomplete element type.
1464
fa01ffcc
JJ
14652015-02-11 Jakub Jelinek <jakub@redhat.com>
1466
1467 PR c/64824
1468 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1469 check in the POP macro.
1470
c3e38a03
MP
14712015-02-09 Marek Polacek <polacek@redhat.com>
1472
1473 PR c/64856
1474 * c-typeck.c (process_init_element): Don't always wrap
1475 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1476 initializing a range of elements.
1477
4886ec8e
JJ
14782015-02-04 Jakub Jelinek <jakub@redhat.com>
1479
1480 PR c/64824
1481 PR c/64868
1482 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1483
c3e38a03 14842015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1485
1486 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1487 processing enum declaration.
1488
7b33f0c8
MP
14892015-01-29 Marek Polacek <polacek@redhat.com>
1490
1491 PR c/64709
1492 * c-typeck.c (pop_init_level): If constructor_elements has
1493 exactly one element with integer_zerop value, set constructor_zeroinit
1494 to 1. Remove braces around warning_init call.
1495
dea63e49
JJ
14962015-01-27 Jakub Jelinek <jakub@redhat.com>
1497
1498 PR c/64766
1499 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1500 of FUNCTION_DECLs with error_mark_node.
1501
d38f7dce
JJ
15022015-01-26 Jakub Jelinek <jakub@redhat.com>
1503
1504 PR c/64778
1505 * c-typeck.c (convert_arguments): Return -1 if there are
1506 error_args, even if we've diagnosed too many arguments.
1507
cbf5d0e7
RB
15082015-01-21 Richard Biener <rguenther@suse.de>
1509
1510 PR middle-end/64313
1511 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1512 for builtins the user declared correctly.
1513
41dbbb37
TS
15142015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1515 Bernd Schmidt <bernds@codesourcery.com>
1516 Cesar Philippidis <cesar@codesourcery.com>
1517 James Norris <jnorris@codesourcery.com>
1518 Jakub Jelinek <jakub@redhat.com>
1519 Ilmir Usmanov <i.usmanov@samsung.com>
1520
1521 * c-parser.c: Include "gomp-constants.h".
1522 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1523 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1524 Use OMP_CLAUSE_SET_MAP_KIND.
1525 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1526 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1527 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1528 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1529 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1530 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1531 "copyout", "create", "delete", "deviceptr", "gang", "host",
1532 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1533 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1534 "present_or_create", "pcreate", "seq", "self", "vector",
1535 "vector_length", "wait", "worker".
1536 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1537 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1538 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1539 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1540 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1541 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1542 (c_parser_oacc_data_clause_deviceptr)
1543 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1544 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1545 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1546 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1547 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1548 (c_parser_oacc_parallel, c_parser_oacc_update)
1549 (c_parser_oacc_wait): New functions.
1550 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1551 (c_finish_oacc_data): New prototypes.
1552 * c-typeck.c: Include "gomp-constants.h".
1553 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1554 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1555 OMP_CLAUSE_SET_MAP_KIND.
1556 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1557 (c_finish_oacc_data): New functions.
1558 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1559 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1560 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1561 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1562 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1563 GOMP_MAP_FORCE_DEVICEPTR.
1564
adfac8df
JJ
15652015-01-09 Michael Collison <michael.collison@linaro.org>
1566
1567 * c-array-notation.c: Include hash-set.h, machmode.h,
1568 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1569 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1570 * c-aux-info.c: Ditto.
1571 * c-convert.c: Ditto.
1572 * c-decl.c: Ditto.
1573 * c-errors.c: Ditto.
1574 * c-lang.c: Dittoxs.
1575 * c-objc-common.c: Ditto.
1576 * c-parser.c: Ditto.
1577 * c-typeck.c: Include hash-set.h, machmode.h,
1578 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1579 fold-const.h, wide-int.h, inchash.h, real.h and
1580 fixed-value.h due to flattening of tree.h.
1581
2cc901dc
MP
15822015-01-07 Marek Polacek <polacek@redhat.com>
1583
1584 PR c/64417
1585 * c-typeck.c (process_init_element): Disallow initialization of
1586 a flexible array member with a string constant if the structure
1587 is in an array.
1588
5624e564
JJ
15892015-01-05 Jakub Jelinek <jakub@redhat.com>
1590
e5341100
JJ
1591 PR sanitizer/64344
1592 * c-typeck.c (convert_for_assignment, c_finish_return): For
1593 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1594 types also set in_late_binary_op around convert call.
1595 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1596 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1597 result on expr as last argument to ubsan_instrument_float_cast,
1598 if in_late_binary_op, don't use c_save_expr but save_expr.
1599
5624e564
JJ
1600 Update copyright years.
1601
5bd012f8
MP
16022015-01-05 Marek Polacek <polacek@redhat.com>
1603
1604 PR c/64423
1605 * c-typeck.c (build_array_ref): Pass loc down to
1606 warn_array_subscript_with_type_char.
1607
768952be
MU
16082014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1609
1610 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1611 (common-pointer-type): For pointers to arrays take qualifiers from
1612 element type.
1613 (build_conditional_expr): Add warnings for lost qualifiers.
1614 (comp-target-types): Allow pointers to arrays with different qualifiers.
1615 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1616 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1617 to PEDWARN_FOR_QUALIFIERS.
1618
8f94a8c4
JJ
16192014-12-17 Jakub Jelinek <jakub@redhat.com>
1620
1621 PR sanitizer/64289
1622 * c-convert.c: Include ubsan.h.
1623 (convert): For real -> integral casts and
1624 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1625 instead instrument the float cast directly.
1626
b731b390
JJ
16272014-11-29 Jakub Jelinek <jakub@redhat.com>
1628
1629 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1630 c_finish_stmt_expr): Remove NULL last argument from
1631 create_tmp_var_raw and create_tmp_var calls.
1632 * c-array-notation.c (fix_builtin_array_notation_fn,
1633 build_array_notation_expr, fix_conditional_array_notations_1,
1634 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1635
541e35a6
MP
16362014-11-28 Marek Polacek <polacek@redhat.com>
1637
1638 PR c/63862
1639 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1640 convert the right operand to integer type.
1641
b286be94
MP
16422014-11-25 Marek Polacek <polacek@redhat.com>
1643
1644 PR c/63877
1645 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1646 for inline functions.
1647
aa7da51a
JJ
16482014-11-21 Jakub Jelinek <jakub@redhat.com>
1649
1650 PR target/63764
1651 * c-typeck.c (build_array_ref): Adjust
1652 convert_vector_to_pointer_for_subscript caller. If it returns true,
1653 call non_lvalue_loc on the result.
1654
d876207f
RB
16552014-11-11 Richard Biener <rguenther@suse.de>
1656
1657 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1658 to true.
1659
e5e44252
AK
16602014-11-10 Andi Kleen <ak@linux.intel.com>
1661
1662 PR c/60804
1663 * c-parser.c (c_parser_statement_after_labels): Call
1664 check_no_cilk.
1665 (c_parser_if_statement): Dito.
1666 (c_parser_switch_statement): Dito.
1667 (c_parser_while_statement): Dito.
1668 (c_parser_do_statement): Dito.
1669 (c_parser_for_statement): Dito.
1670 * c-typeck.c (c_finish_loop): Dito.
1671
13c21655
PC
16722014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1673
1674 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1675 OPT_Wshift_count_overflow in the warnings.
1676
2d51fcef
MP
16772014-10-30 Marek Polacek <polacek@redhat.com>
1678
1679 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1680 print the stripped version as well, if they're not the same.
1681
ef4bddc2
RS
16822014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1683
1684 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1685 machine_mode.
1686
c582198b
AM
16872014-10-28 Andrew MacLeod <amacleod@redhat.com>
1688
1689 * c-decl.c: Adjust include files.
1690 * c-parser.c: Ditto.
1691
ddc8de03
PM
16922014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1693 Tom Tromey <tromey@redhat.com>
1694
1695 * c-tree.h (enum c_oracle_request): New.
1696 (c_binding_oracle_function): New typedef.
1697 (c_binding_oracle, c_pushtag, c_bind): Declare.
1698 * c-decl.c (c_binding_oracle): New global.
1699 (I_SYMBOL_CHECKED): New macro.
1700 (i_symbol_binding): New function.
1701 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1702 (I_TAG_CHECKED): New macro.
1703 (i_tag_binding): New function.
1704 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1705 (I_LABEL_CHECKED): New macro.
1706 (i_label_binding): New function.
1707 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1708 (c_print_identifier): Save and restore c_binding_oracle.
1709 (c_pushtag, c_bind): New functions.
1710
60393bbc
AM
17112014-10-27 Andrew MacLeod <amacleod@redhat.com>
1712
1713 * c-typeck.c: Adjust include files.
1714
d723bb7c
MLI
17152014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1716
1717 PR c++/53061
1718 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1719 initialization here...
1720 (c_initialize_diagnostics): ... but here. Set defaults after
1721 building pretty-printer.
1722
1bc5a451
MP
17232014-10-23 Marek Polacek <polacek@redhat.com>
1724
1725 PR c/63626
1726 * c-decl.c (pop_scope): Don't print warning in external_scope.
1727
4435bb92
MP
17282014-10-19 Marek Polacek <polacek@redhat.com>
1729
1730 PR c/63567
1731 * c-typeck.c (output_init_element): Allow initializing objects with
1732 static storage duration with compound literals even in C99 and add
1733 pedwarn for it.
1734
7278465e
MP
17352014-10-17 Marek Polacek <polacek@redhat.com>
1736
1737 PR c/63567
1738 * c-typeck.c (digest_init): Allow initializing objects with static
1739 storage duration with compound literals even in C99 and add pedwarn
1740 for it.
1741
d9b7be2e
MP
17422014-10-17 Marek Polacek <polacek@redhat.com>
1743
1744 PR c/63543
1745 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1746 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1747 error multiple times. Print the type.
1748
f406ae1f
MP
17492014-10-17 Marek Polacek <polacek@redhat.com>
1750
1751 PR c/63549
1752 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1753 type.
1754
92574c7c
MP
17552014-10-17 Marek Polacek <polacek@redhat.com>
1756
1757 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1758 (start_function): Use OPT_Wimplicit_int instead of 0.
1759 (store_parm_decls_oldstyle): Likewise.
1760
1bc4a978
MT
17612014-10-17 Alan Modra <amodra@gmail.com>
1762
1763 PR middle-end/61848
1764 * c-decl.c (merge_decls): Don't merge section name or tls model
1765 to newdecl symtab node, instead merge to olddecl. Override
1766 existing olddecl section name. Set tls_model for all thread-local
1767 vars, not just OMP thread-private ones. Remove incorrect comment.
1768
83685514
AM
17692014-10-16 Andrew MacLeod <amacleod@redhat.com>
1770
1771 * c-decl.c: Adjust include files.
1772
78a7c317
DD
17732014-10-14 DJ Delorie <dj@redhat.com>
1774
1775 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1776 (c_token_starts_typename): Check all __intN, not just __int128.
1777 (c_token_starts_declspecs): Likewise.
1778 (c_parser_declspecs): Likewise.
1779 (c_parser_attribute_any_word): Likewise.
1780 (c_parser_objc_selector): Likewise.
1781 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1782 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1783 is specified.
1784 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1785 __int128.
1786 (finish_declspecs): Likewise.
1787
74d98c1e
AB
17882014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1789
1790 * c-parser.c (c_parser_all_labels): New function to replace
1791 the duplicate code.
1792 (c_parser_statement): Call the new function.
1793
84937de2
MP
17942014-10-09 Marek Polacek <polacek@redhat.com>
1795
1796 PR c/63480
1797 * c-typeck.c (pop_init_level): Don't warn about initializing
1798 with { }.
1799
0382aaa0
MP
18002014-10-07 Marek Polacek <polacek@redhat.com>
1801
1802 PR c/59717
1803 * c-decl.c (header_for_builtin_fn): New function.
1804 (implicitly_declare): Suggest which header to include.
1805
7a0ca710
MP
18062014-10-07 Marek Polacek <polacek@redhat.com>
1807
1808 * c-convert.c (convert): Use error_operand_p.
1809 * c-typeck.c (require_complete_type): Likewise.
1810 (really_atomic_lvalue): Likewise.
1811 (digest_init): Likewise.
1812 (handle_omp_array_sections_1): Likewise.
1813
6bc8a126
MP
18142014-10-03 Marek Polacek <polacek@redhat.com>
1815
1816 PR c/63453
1817 * c-decl.c (pop_scope): Don't warn about "inline function declared
1818 but never defined" for functions marked with gnu_inline attribute.
1819
d90c0a59
JJ
18202014-09-25 Jakub Jelinek <jakub@redhat.com>
1821
1822 PR c++/63249
1823 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1824 on low_bound and length.
1825
083e891e
MP
18262014-09-24 Marek Polacek <polacek@redhat.com>
1827
1828 PR c/61405
1829 PR c/53874
1830 * c-parser.c: Don't define CPP_KEYWORD.
1831 (c_parser_switch_statement): Pass original type to c_finish_case.
1832 * c-tree.h (c_finish_case): Update declaration.
1833 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1834 conditionally to c_do_switch_warnings.
1835
8d95fe25
MP
18362014-09-03 Marek Polacek <polacek@redhat.com>
1837
1838 PR c/62024
1839 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1840 conversions.
1841
9a771876
JJ
18422014-09-02 Jakub Jelinek <jakub@redhat.com>
1843 Balaji V. Iyer <balaji.v.iyer@intel.com>
1844 Igor Zamyatin <igor.zamyatin@intel.com>
1845
1846 * c-parser.c (c_parser_cilk_for): New function.
1847 (c_parser_cilk_grainsize): Likewise.
1848 (c_get_temp_regvar): Likewise.
1849 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1850 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1851 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1852 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1853 case.
1854
b7679d96
CG
18552014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1856
1857 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1858 with using HOST_WIDE_INT without truncation to 'int'
1859
59ea0364
MP
18602014-08-22 Marek Polacek <polacek@redhat.com>
1861
1862 PR c++/62199
1863 * c-typeck.c (parser_build_binary_op): Adjust call to
1864 warn_logical_not_parentheses.
1865
671a475e
IZ
18662014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1867
1868 PR other/62008
1869 * c-parser.c (c_parser_array_notation): Check for correct
1870 type of an array added.
1871
04159acf
MP
18722014-08-19 Marek Polacek <polacek@redhat.com>
1873
1874 PR c++/62153
1875 * c-typeck.c (build_binary_op): If either operand of a comparison
1876 is a boolean expression, call maybe_warn_bool_compare.
1877
c77935ee
PP
18782014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1879
1880 PR c/45584
1881 * c-typeck.c (build_c_cast): Do a conversion even when the
1882 TYPE_MAIN_VARIANTs are the same.
1883
35aff4fb
MP
18842014-08-19 Marek Polacek <polacek@redhat.com>
1885
1886 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1887 pedwarn_c99 instead of pedwarn.
1888 (grokfield): Likewise.
1889 (warn_defaults_to): New function.
1890 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1891 Unconditionally call pedwarn_c99 instead of pedwarn.
1892 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1893 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1894 check flag_isoc11 before.
1895 * c-errors.c (pedwarn_c99): Change the return type to bool.
1896 Handle -Wc99-c11-compat.
1897 * c-parser.c (disable_extension_diagnostics): Handle
1898 warn_c99_c11_compat.
1899 (restore_extension_diagnostics): Likewise.
1900 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1901 instead of pedwarn, don't check flag_isoc11 before.
1902 (c_parser_declspecs): Likewise.
1903 (c_parser_alignas_specifier): Likewise.
1904 (c_parser_alignof_expression): Likewise.
1905 (c_parser_generic_selection): Likewise.
1906 * c-tree.h (pedwarn_c99): Update declaration.
1907 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1908 of pedwarn_c99.
1909
177cce46
MP
19102014-08-19 Marek Polacek <polacek@redhat.com>
1911
1912 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1913 to pedwarn_c90.
1914 * c-errors.c: Include "opts.h".
1915 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1916 * c-parser.c (disable_extension_diagnostics): Handle negative value
1917 of warn_c90_c99_compat, too.
1918 (restore_extension_diagnostics): Likewise.
1919 (c_parser_compound_statement_nostart): Pass
1920 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1921
6dc99c33
MP
19222014-08-12 Marek Polacek <polacek@redhat.com>
1923
1924 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1925 Add pedwarn.
1926 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1927 Likewise.
1928 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1929
f3bede71
MP
19302014-08-10 Marek Polacek <polacek@redhat.com>
1931
1932 PR c/51849
1933 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1934 Call pedwarn_c90 instead of pedwarn.
1935 (check_bitfield_type_and_width): Likewise.
1936 (declspecs_add_qual): Likewise.
1937 (declspecs_add_type): Likewise.
1938 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1939 Adjust to only call pedwarn_c90.
1940 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1941 pedwarn_c90 instead of pedwarn.
1942 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1943 * c-parser.c (disable_extension_diagnostics): Handle
1944 warn_c90_c99_compat.
1945 (restore_extension_diagnostics): Likewise.
1946 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1947 pedwarn_c90 instead of pedwarn.
1948 (c_parser_initelt): Likewise.
1949 (c_parser_postfix_expression): Likewise.
1950 (c_parser_postfix_expression_after_paren_type): Likewise.
1951 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1952 * c-tree.h: Fix formatting.
1953 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1954 pedwarn_c90 instead of pedwarn.
1955
9f25a338
TS
19562014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1957
1958 * c-typeck.c: Remove include of pointer-set.h.
1959
044331a8
MP
19602014-08-07 Marek Polacek <polacek@redhat.com>
1961
1962 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1963
b787e7a2
TS
19642014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1965
1966 * c-typeck.c: Use hash_map instead of pointer_map.
1967
6e2830c3
TS
19682014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1969
1970 * c-decl.c: Use hash_set instead of pointer_set.
1971
a7ee52fb
IZ
19722014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1973
1974 PR middle-end/61455
1975 * c-array-notation.c (expand_array_notations): Handling
1976 of DECL_EXPR added.
1977
b4dfdc11
MG
19782014-07-31 Marc Glisse <marc.glisse@inria.fr>
1979
1980 PR c++/60517
1981 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1982 a local variable.
1983
976d5a22
TT
19842014-07-30 Tom Tromey <tromey@redhat.com>
1985
1986 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1987 field.
1988 (really_start_incremental_init, push_init_level): Initialize
1989 designator_depth.
1990 (pop_init_level): Set global designator_depth.
1991 (process_init_element): Check for designated_init attribute.
1992
30281de2
MP
19932014-07-20 Marek Polacek <polacek@redhat.com>
1994
1995 PR c/61852
1996 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1997 (implicitly_declare): Pass location to implicit_decl_warning.
1998
b108f48f
JJ
19992014-07-14 Jakub Jelinek <jakub@redhat.com>
2000
2001 PR middle-end/61294
2002 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2003 If non-NULL, call c_parser_check_literal_zero.
2004 (c_parser_check_literal_zero): New function.
2005 (c_parser_postfix_expression_after_primary): Adjust
2006 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2007
773ec47f
MP
20082014-07-06 Marek Polacek <polacek@redhat.com>
2009
2010 PR c/6940
2011 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2012 * c-tree.h (C_ARRAY_PARAMETER): Define.
2013 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2014 function parameter.
2015
22e1cf1c
JH
20162014-07-02 Jan Hubicka <hubicka@ucw.cz>
2017 Chen Gang <gang.chen.5i5j@gmail.com>
2018
2019 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2020 releasing symbol.
2021
52ec0ea3
MP
20222014-07-01 Marek Polacek <polacek@redhat.com>
2023
2024 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2025 instead of 0 to WARN_FOR_ASSIGNMENT.
2026
d5c3d343
MP
20272014-07-01 Marek Polacek <polacek@redhat.com>
2028
2029 PR c/58286
2030 * c-typeck.c (convert_for_assignment): Pass
2031 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2032
6a7253a4
MP
20332014-06-30 Marek Polacek <polacek@redhat.com>
2034
2035 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2036 has no_sanitize_undefined attribute.
2037
5e88a8f4
IZ
20382014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2039
2040 PR middle-end/57541
2041 * c-array-notation.c (fix_builtin_array_notation_fn):
2042 Check for 0 arguments in builtin call. Check that bultin argument is
2043 correct.
2044 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2045 index.
2046
9698b078
SH
20472014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2048
2049 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2050 qualifiers in __auto_type for atomic types.
2051 (c_parser_typeof_specifier): Discard all type qualifiers in
2052 __typeof__ for atomic types.
2053
6e07c515
MP
20542014-06-25 Marek Polacek <polacek@redhat.com>
2055
2056 PR c/61162
2057 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2058 the return expression to c_finish_return.
2059
da6f124d
JJ
20602014-06-25 Jakub Jelinek <jakub@redhat.com>
2061
2062 * c-typeck.c (c_finish_omp_clauses): Make sure
2063 OMP_CLAUSE_LINEAR_STEP has correct type.
2064
c203e8a7
TS
20652014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2066
2067 * c-decl.c: Adjust.
2068
56ad0e38
JJ
20692014-06-24 Jakub Jelinek <jakub@redhat.com>
2070
2071 * c-parser.c (c_parser_omp_for_loop): For
2072 #pragma omp parallel for simd move lastprivate clause from parallel
2073 to for rather than simd.
2074
47c2554f
MP
20752014-06-23 Marek Polacek <polacek@redhat.com>
2076
2077 * c-typeck.c (parser_build_binary_op): Don't call
2078 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2079
56363ffd
JH
20802014-06-15 Jan Hubicka <hubicka@ucw.cz>
2081
2082 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2083 * c-decl.c (merge_decls): Likewise.
2084
d7ff7ae5
MP
20852014-06-09 Marek Polacek <polacek@redhat.com>
2086
2087 PR c/36446
2088 * c-typeck.c (error_init): Call inform instead of error_at.
2089 (pedwarn_init): Call inform instead of pedwarn.
2090 (warning_init): Call inform instead of warning_at.
2091
24d047a3
JH
20922014-06-07 Jan Hubicka <hubicka@ucw.cz>
2093
2094 * c-decl.c (merge_decls): Use set_decl_section_name.
2095 (duplicate_decls): Remove node if it exists.
2096
9bac5cbb
G
20972014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2098
2099 PR c/53119
2100 * c-typeck.c (push_init_level, process_init_element,
2101 pop_init_level): Correct check for zero initialization, move
2102 missing brace warning to respect zero initialization.
2103
8ffcdea8
MP
21042014-06-05 Marek Polacek <polacek@redhat.com>
2105
2106 PR c/56724
2107 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2108
742938c9
MP
21092014-06-05 Marek Polacek <polacek@redhat.com>
2110
2111 PR c/49706
2112 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2113 on the left hand side operand of a comparison.
2114
6447c55d
MP
21152014-06-05 Marek Polacek <polacek@redhat.com>
2116
2117 PR c/48062
2118 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2119 Print note only if the warning was printed.
2120
9dc7743c
IZ
21212014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2122
2123 PR c/58942
2124 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2125 with a pointer.
2126
fedfecef
MP
21272014-06-03 Marek Polacek <polacek@redhat.com>
2128
2129 PR c/60439
2130 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2131 c_start_case.
2132 * c-tree.h (c_start_case): Update.
2133 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2134 switch condition has boolean value.
2135
9b2b7279
AM
21362014-06-02 Andrew MacLeod <amacleod@redhat.com>
2137
2138 * c-decl.c: Include builtins.h.
2139 * c-parser.c: Likewise.
2140
5c1bc275
MP
21412014-05-27 Marek Polacek <polacek@redhat.com>
2142
2143 PR c/56724
2144 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2145 error and warning calls to error_at and warning_at. Pass location of
2146 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2147 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2148 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2149
97563bc8
IZ
21502014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2151
2152 PR c/61191
2153 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2154 function parameters.
2155
aede2c10
JH
21562014-05-23 Jan Hubicka <hubicka@ucw.cz>
2157
2158 * c-decl.c (merge_decls): Preserve symtab node pointers.
2159 (duplicate_decls): Free new decl.
2160
edbba2ce
TS
21612014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2162
f3316c6d
TS
2163 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2164 initialization.
2165
edbba2ce
TS
2166 * c-parser.c (c_parser_omp_target): Return bool values.
2167
68c81f24
TS
21682014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2169
2170 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2171 num_teams_loc variable to num_thread_limit_loc.
2172
632f2871
RS
21732014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2174
2175 * c-array-notation.c (expand_array_notations): Use void_node
2176 instead of void_zero_node.
2177
766090c2
TS
21782014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2179
2180 * c-decl.c (finish_struct): Adjust.
2181 (finish_enum): Likewise.
2182 (bind): Adjust.
2183 (record_inline_static): Likewise.
2184 (push_scope): Likewise.
2185 (make_label): Likewise.
2186 (lookup_label_for_goto): Likewise.
2187 (finish_struct): Likewise.
2188 (finish_enum): Likewise.
2189 (store_parm_decls): Likewise.
2190 (c_push_function_context): Likewise.
2191 * c-lang.h: Remove usage of variable_size gty attribute.
2192 * c-parser.c (c_parse_init): Adjust.
2193 (c_parse_file): Likewise.
2194
2b107f6b
MP
21952014-05-13 Marek Polacek <polacek@redhat.com>
2196
2197 PR c/61162
2198 * c-typeck.c (convert_for_assignment): Pass location to
2199 WARN_FOR_ASSIGNMENT instead of input_location.
2200
d033409e
MP
22012014-05-10 Marek Polacek <polacek@redhat.com>
2202
2203 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2204 maybe_warn_string_init.
2205 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2206 maybe_warn_string_init.
2207 * c-tree.h (maybe_warn_string_init): Update declaration.
2208 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2209 Call pedwarn_init with loc instead of with input_location.
2210 (digest_init): Pass init_loc to maybe_warn_string_init.
2211 (pop_init_level): Call pedwarn_init with loc instead of with
2212 input_location.
2213 (set_init_index): Likewise.
2214 (process_init_element): Likewise.
2215
ea58ef42
MP
22162014-05-09 Marek Polacek <polacek@redhat.com>
2217
2218 PR c/61096
2219 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2220 (c_parser_initelt): Pass location to set_init_label. Pass array index
2221 location to set_init_index.
2222 * c-tree.h (push_init_level): Update declaration.
2223 (pop_init_level): Likewise.
2224 (set_init_index): Likewise.
2225 (set_init_label): Likewise.
2226 * c-typeck.c (error_init): Add location parameter. Call error_at
2227 instead of error.
2228 (digest_init): Pass init_loc to error_init.
2229 (really_start_incremental_init):
2230 (push_init_level): Add location parameter. Pass loc to pop_init_level
2231 and error_init.
2232 (pop_init_level): Likewise.
2233 (set_designator): Add location parameter. Pass loc to pop_init_level,
2234 push_init_level, and error_init.
2235 (set_init_index): Add location parameter. Pass loc to error_init and
2236 set_designator.
2237 (set_init_label): Likewise.
2238 (output_init_element): Pass loc to error_init.
2239 (process_init_element): Pass loc to error_init, pop_init_level,
2240 pedwarn_init, and push_init_level.
2241
661a0813
MP
22422014-05-09 Marek Polacek <polacek@redhat.com>
2243
2244 PR c/50459
2245 * c-parser.c (c_parser_attributes): Parse the arguments as an
2246 expression-list if the attribute takes identifier.
2247
2793eeab
MP
22482014-05-08 Marek Polacek <polacek@redhat.com>
2249
2250 PR c/61053
2251 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2252 TYPE_ALIGN_UNIT.
2253
f827930a
MP
22542014-05-08 Marek Polacek <polacek@redhat.com>
2255
2256 PR c/61077
2257 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2258 of main.
2259
1d60af08
KZ
22602014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2261 Mike Stump <mikestump@comcast.net>
2262 Richard Sandiford <rdsandiford@googlemail.com>
2263
2264 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2265 (finish_enum): Use wide-int interfaces.
2266 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2267 * c-typeck.c (build_c_cast): Likewise.
2268 (set_nonincremental_init_from_string): Likewise.
2269 (c_tree_equal): Likewise.
2270
a0e24419
MP
22712014-05-02 Marek Polacek <polacek@redhat.com>
2272
2273 PR c/25801
2274 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2275 Return size_one_node when the type is not complete.
2276 (pointer_diff): Remove comment.
2277 (build_unary_op): Improve error messages.
2278
19fc9faa
MP
22792014-05-02 Marek Polacek <polacek@redhat.com>
2280
2281 * c-typeck.c (c_finish_return): Separate warning_at calls.
2282
63bc4e87
MP
22832014-05-02 Marek Polacek <polacek@redhat.com>
2284
2285 * c-tree.h (error_init): Remove declaration.
2286 (pedwarn_init): Likewise.
2287 * c-typeck.c (error_init): Make static and move above.
2288 (pedwarn_init): Likewise.
2289 (warning_init): Move above.
2290 (maybe_warn_string_init): Likewise.
2291
4bd2511b
JL
22922014-05-01 Jeff Law <law@redhat.com>
2293
2294 Revert:
2295
2296 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2297 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2298 avoid goto.
2299
6a358dcb
MP
23002014-05-02 Marek Polacek <polacek@redhat.com>
2301
2302 PR c/60784
2303 * c-typeck.c (push_init_level): Set constructor_designated to
2304 p->designated for structures.
2305
ae5ebda4
MP
23062014-05-01 Marek Polacek <polacek@redhat.com>
2307
2308 PR c/60915
2309 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2310 function-definition has an attribute after the declarator.
2311
96b40f8d
MP
23122014-05-01 Marek Polacek <polacek@redhat.com>
2313
2314 PR c/60257
2315 * c-typeck.c (warning_init): Add location_t parameter. Call
2316 warning_at instead of warning.
2317 (push_init_level): Pass input_location to warning_init.
2318 (add_pending_init): Add location_t parameter. Pass loc to
2319 warning_init.
2320 (set_nonincremental_init): Pass input_location to add_pending_init.
2321 (set_nonincremental_init_from_string): Likewise.
2322 (output_init_element): Pass loc to warning_init and to
2323 add_pending_init.
2324
32e00768
MP
23252014-05-01 Marek Polacek <polacek@redhat.com>
2326
2327 PR c/43395
2328 * c-typeck.c (c_finish_return): Distinguish between label and variable
2329 when warning about returning local address.
2330
c9379ce2
MP
23312014-05-01 Marek Polacek <polacek@redhat.com>
2332
2333 PR c/29467
2334 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2335 in C89 mode.
2336
d00887e8
MP
23372014-05-01 Marek Polacek <polacek@redhat.com>
2338
2339 PR c/43245
2340 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2341 instead of 0 to WARN_FOR_QUALIFIERS.
2342
5436fa2e
MP
23432014-05-01 Marek Polacek <polacek@redhat.com>
2344
2345 PR c/56989
2346 * c-typeck.c (default_conversion): Use better location for
2347 error call.
2348
f8ed5150
MP
23492014-04-30 Marek Polacek <polacek@redhat.com>
2350
2351 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2352 also when SANITIZE_FLOAT_DIVIDE is on.
2353
8337d1db
MP
23542014-04-30 Marek Polacek <polacek@redhat.com>
2355
2356 PR c/60139
2357 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2358 and pedwarn_init. Use loc insted of input_location.
2359
c4bdc42f
MP
23602014-04-30 Marek Polacek <polacek@redhat.com>
2361
2362 PR c/60351
2363 * c-typeck.c (build_binary_op): Use location when warning about
2364 shift count.
2365
45484dcf
MP
23662014-04-25 Marek Polacek <polacek@redhat.com>
2367
2368 PR c/18079
2369 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2370 always_inline/noinline and hot/cold attributes.
2371
34cf811f
MP
23722014-04-25 Marek Polacek <polacek@redhat.com>
2373
2374 PR c/60114
2375 * c-parser.c (c_parser_initelt): Pass input_location to
2376 process_init_element.
2377 (c_parser_initval): Pass loc to process_init_element.
2378 * c-tree.h (process_init_element): Adjust declaration.
2379 * c-typeck.c (push_init_level): Pass input_location to
2380 process_init_element.
2381 (pop_init_level): Likewise.
2382 (set_designator): Likewise.
2383 (output_init_element): Add location_t parameter. Pass loc to
2384 digest_init.
2385 (output_pending_init_elements): Pass input_location to
2386 output_init_element.
2387 (process_init_element): Add location_t parameter. Pass loc to
2388 output_init_element.
2389
42056eac
JJ
23902014-04-24 Jakub Jelinek <jakub@redhat.com>
2391
2392 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2393 atomic-clause, allow comma in between atomic-clause and
2394 seq_cst.
2395
e162a134
JJ
23962014-04-22 Jakub Jelinek <jakub@redhat.com>
2397
2398 PR c/59073
2399 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2400 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2401
2f6babac
IZ
24022014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2403
2404 PR middle-end/60469
2405 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2406 create_tmp_var instead build_decl for creating temps.
2407 (build_array_notation_expr): Likewise.
2408 (fix_conditional_array_notations_1): Likewise.
2409 (fix_array_notation_expr): Likewise.
2410 (fix_array_notation_call_expr): Likewise.
2411
8edbfaa6
JJ
24122014-03-28 Jakub Jelinek <jakub@redhat.com>
2413
2414 PR c++/60689
2415 * c-tree.h (c_build_function_call_vec): New prototype.
2416 * c-typeck.c (build_function_call_vec): Don't call
2417 resolve_overloaded_builtin here.
2418 (c_build_function_call_vec): New wrapper function around
2419 build_function_call_vec. Call resolve_overloaded_builtin here.
2420 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2421 Call c_build_function_call_vec instead of build_function_call_vec.
2422 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2423 * c-decl.c (finish_decl): Likewise.
2424
7485aeea
MLI
24252014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2426
2427 PR c/55383
2428 * c-typeck.c: Use correct format string in cast-qual warning
2429
b17a8b07
TS
24302014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2431
2432 * c-decl.c (c_decl_attributes): Use
2433 lang_hooks.types.omp_mappable_type.
2434 * c-typeck.c (c_finish_omp_clauses): Likewise.
2435
3af9c5e9
MP
24362014-03-06 Marek Polacek <polacek@redhat.com>
2437
2438 PR c/60197
2439 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2440 of checking tree code.
2441
1c9f5f33
PK
24422014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2443
2444 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2445 (c_parser_parameter_declaration): Likewise.
2446
cc28fc7f
MP
24472014-02-19 Marek Polacek <polacek@redhat.com>
2448
2449 PR c/60195
2450 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2451 Call mark_exp_read on exp.value.
2452 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2453 TREE_ADDRESSABLE on old instead of val.
2454 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2455
b581c05c
PK
24562014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2457
2458 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2459 C_EXPR_APPEND by vec_safe_push.
2460 * c-tree.h (C_EXPR_APPEND): Remove.
2461
81e5eca8
MP
24622014-01-31 Marek Polacek <polacek@redhat.com>
2463
2464 PR c/59963
2465 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2466 build_function_call_vec.
2467 (build_function_call): Likewise.
2468 (build_atomic_assign): Likewise.
2469 (build_function_call_vec): Add arg_loc parameter. Use it.
2470 (convert_arguments): Likewise.
2471 (convert_for_assignment): Rename rhs_loc to expr_loc.
2472 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2473 (c_parser_objc_keywordexpr): Likewise.
2474 (c_parser_postfix_expression_after_primary): Call
2475 build_function_call_vec with expr_loc rather than op_loc.
2476 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2477 build_function_call_vec.
2478 (c_parser_expr_list): Add locations parameter. Fill it with locations
2479 of function arguments.
2480 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2481
68fca595
MP
24822014-01-30 Marek Polacek <polacek@redhat.com>
2483
2484 PR c/59940
2485 * c-typeck.c (build_function_call_vec): Use loc parameter.
2486 (convert_arguments): Add location parameter. Use it.
2487 (ep_convert_and_check): Likewise.
2488 (build_atomic_assign): Adjust convert_for_assignment call.
2489 (build_modify_expr): Likewise.
2490 (digest_init): Likewise.
2491 (c_finish_return): Likewise.
2492 (build_conditional_expr): Adjust ep_convert_and_check calls.
2493 (convert_for_assignment): Add rhs_loc parameter. Use it.
2494 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2495 calls.
2496
fa337f3a
RB
24972014-01-30 Richard Biener <rguenther@suse.de>
2498
2499 PR c/59905
2500 * c-typeck.c (build_function_call_vec): Do not replace calls
2501 to a function via an incompatible type with a runtime abort.
2502
b72271b9
BI
25032014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2504
2505 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2506 flag_enable_cilkplus with flag_cilkplus.
2507 (c_parser_direct_declarator_inner): Likewise.
2508 (c_parser_attribute_any_word): Likewise.
2509 (c_parser_attributes): Likewise.
2510 (c_parser_compound_statement): Likewise.
2511 (c_parser_statement_after_labels): Likewise.
2512 (c_parser_if_statement): Likewise.
2513 (c_parser_switch_statement): Likewise.
2514 (c_parser_do_statement): Likewise.
2515 (c_parser_for_statement): Likewise.
2516 (c_parser_unary_expression): Likewise.
2517 (c_parser_postfix_expression): Likewise.
2518 (c_parser_postfix_expression_after_primary): Likewise.
2519 (c_parser_postfix_expression_after_primary): Likewise.
2520 (c_parser_omp_clause_name): Likewise.
2521 (c_finish_omp_declare_simd): Likewise.
2522 (c_parser_cilk_verify_simd): Likewise.
2523 * c-typeck.c (build_array_ref): Likewise.
2524 (build_function_call_vec): Likewise.
2525 (convert_arguments): Likewise.
2526 (build_compound_expr): Likewise.
2527 (c_finish_return): Likewise.
2528 (c_finish_if_stmt): Likewise.
2529 (c_finish_loop): Likewise.
2530 (build_binary_op): Likewise.
2531
393e8e8b
MP
25322014-01-23 Marek Polacek <polacek@redhat.com>
2533
2534 PR c/59846
2535 * c-typeck.c (parser_build_binary_op): Use location instead of
2536 input_location.
2537 (build_binary_op): Pass location to shorten_compare.
2538
f04dda30
MP
25392014-01-23 Marek Polacek <polacek@redhat.com>
2540
2541 PR c/58346
2542 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2543 an empty aggregate.
2544
789eadcd
MP
25452014-01-23 Marek Polacek <polacek@redhat.com>
2546
2547 PR c/59871
2548 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2549 of a comma expression.
2550 (emit_side_effect_warnings): Likewise.
2551
40f14e9f
BI
25522014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2553
2554 PR c/59825
2555 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2556 function to use walk_tree and moved a lot of its functionality to
2557 expand_array_notations.
2558 (expand_array_notations): New function.
2559
74558dd9
BI
25602014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2561
2562 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2563 attribute an attribute without value.
2564
652fea39
JJ
25652014-01-23 Jakub Jelinek <jakub@redhat.com>
2566
2567 PR middle-end/58809
2568 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2569 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2570
f34f1c87
MP
25712014-01-22 Marek Polacek <polacek@redhat.com>
2572
2573 PR c/59891
2574 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2575 of remove_c_maybe_const_expr on op1 and op2.
2576
241f845a
JJ
25772014-01-15 Jakub Jelinek <jakub@redhat.com>
2578
2579 PR c/58943
2580 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2581 effects, preevaluate rhs using SAVE_EXPR first.
2582
9a74f20c
BI
25832014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2584
2585 PR c++/59631
2586 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2587 statements with if-elseif statements.
2588
96066ce1
MP
25892014-01-06 Marek Polacek <polacek@redhat.com>
2590
2591 PR c/57773
2592 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2593 defined bit-field types only in ISO C.
2594
23a5b65a
RS
25952014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2596
2597 Update copyright years
2598
f9030485
RS
25992014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2600
2601 * c-array-notation.c: Use the standard form for the copyright notice.
2602
41958c28
BI
26032013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2604
2605 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2606 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2607 field in parser is not empty. If not-empty, call the function
2608 c_parser_finish_omp_declare_simd.
2609 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2610 between SIMD-enabled functions and #pragma simd. Added new parameter.
2611 (c_parser_cilk_all_clauses): Modified the usage of the function
2612 c_parser_cilk_clause_vectorlength as mentioned above.
2613 (c_parser_cilk_simd_fn_vector_attrs): New function.
2614 (c_finish_cilk_simd_fn_tokens): Likewise.
2615 (is_cilkplus_vector_p): Likewise.
2616 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2617 "nomask," and "mask" strings in clause name.
2618 (c_parser_omp_all_clauses): Added 3 new case statements:
2619 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2620 PRAGMA_CILK_CLAUSE_NOMASK.
2621 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2622 check for vector attribute and if so call the function
2623 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2624 called the function c_finish_cilk_simd_fn_tokens.
2625 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2626 parser field is non-empty. If so, parse them as you would parse
2627 the omp declare simd pragma.
2628 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2629 Added a check when step is a parameter and flag it as error.
2630 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2631 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2632 pragma_omp_clause.
2633
cef0fd0e
TS
26342013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2635
2636 * c-parser.c (c_parser_omp_parallel): Fix description.
2637
12893402
BI
26382013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2639
2640 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2641 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2642 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2643 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2644
296674db
JM
26452013-12-04 Joseph Myers <joseph@codesourcery.com>
2646
2647 PR c/52023
2648 * c-parser.c (c_parser_alignas_specifier): Use
2649 c_sizeof_or_alignof_type instead of c_alignof.
2650 (c_parser_alignof_expression): Likewise, with min_alignof
2651 parameter depending on alignof spelling used.
2652
edd28054
MP
26532013-12-04 Marek Polacek <polacek@redhat.com>
2654
2655 PR c/54113
2656 * c-decl.c (start_function): Don't warn for missing prototype for
2657 inline functions.
2658
da0fc454
MP
26592013-12-03 Marek Polacek <polacek@redhat.com>
2660
2661 PR c/59351
2662 * c-decl.c (build_compound_literal): Allow compound literals with
2663 empty initial value.
2664
4c2ecab0
JM
26652013-12-02 Joseph Myers <joseph@codesourcery.com>
2666
2667 PR c/58235
2668 * c-typeck.c (build_modify_expr): Diagnose assignment to
2669 expression with array type.
2670
340baef7
JM
26712013-11-29 Joseph Myers <joseph@codesourcery.com>
2672
2673 PR c/42262
2674 * c-typeck.c (process_init_element): Do not treat a string as
2675 initializing a whole array when used with a designator for an
2676 individual element.
2677
6763b9f7
JM
26782013-11-29 Joseph Myers <joseph@codesourcery.com>
2679
2680 PR c/57574
2681 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2682 an inline function following a static declaration.
2683
e7bd1de1
JJ
26842013-11-28 Jakub Jelinek <jakub@redhat.com>
2685
2686 PR c/59310
2687 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2688 to p_name before calling c_parser_omp_teams instead of after.
2689 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2690 argument. Remove unused p_name variable.
2691
0136f8f0
AH
26922013-11-27 Aldy Hernandez <aldyh@redhat.com>
2693 Jakub Jelinek <jakub@redhat.com>
2694
2695 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2696 external_scope is NULL.
2697
241b71bb
TV
26982013-11-27 Tom de Vries <tom@codesourcery.com>
2699 Marc Glisse <marc.glisse@inria.fr>
2700
2701 PR c++/59032
2702 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2703
2fb9a547
AM
27042013-11-22 Andrew MacLeod <amacleod@redhat.com>
2705
2706 * c-typeck.c: Add required include files from gimple.h.
2707
8400e75e
DM
27082013-11-22 David Malcolm <dmalcolm@redhat.com>
2709
2710 * c-decl.c (define_label, shadow_tag_warned)
2711 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2712 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2713 (declspecs_add_type): Remove use of in_system_header macro.
2714 * c-parser.c (c_parser_unary_expression): Likewise.
2715 * c-typeck.c (store_init_value, process_init_element)
2716 (c_start_case): Likewise.
2717
2718 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2719 macro.
2720
2721 * c-parser.c (c_parser_set_source_position_from_token): Remove
2722 reference to in_system_header from comment.
2723
386b1f1f
RS
27242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2725
2726 * c-decl.c (grokdeclarator): Update comment to refer to
2727 tree_to_[su]hwi rather than tree_low_cst.
2728
ae7e9ddd
RS
27292013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2730
2731 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2732 tree_to_uhwi throughout.
2733
9439e9a1
RS
27342013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2735
2736 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2737 throughout.
2738
9541ffee
RS
27392013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2740
2741 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2742 throughout.
2743
c02065fc
AH
27442013-11-15 Aldy Hernandez <aldyh@redhat.com>
2745
2746 * c-parser.c (c_parser_cilk_simd): New.
2747 (c_parser_cilk_verify_simd): New.
2748 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2749 (c_parser_omp_for_loop): Add case for NE_EXPR.
2750 Set c_break_label for CILK_SIMD.
2751 (c_parser_cilk_clause_vectorlength): New.
2752 (c_parser_cilk_clause_linear): New.
2753 (c_parser_cilk_clause_name): New.
2754 (c_parser_cilk_all_clauses): New.
2755 * c-typeck.c (build_unary_op): Pass location argument to
2756 readonly_error.
2757 (build_modify_expr): Same.
2758 (build_asm_expr): Same.
2759 (c_finish_bc_stmt): Error on break/continue in loops.
2760
18f429e2
AM
27612013-11-14 Andrew MacLeod <amacleod@redhat.com>
2762
2763 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2764
d8a2d370
DN
27652013-11-14 Diego Novillo <dnovillo@google.com>
2766
2767 * c-decl.c: Include print-tree.h.
2768 Include stor-layout.h.
2769 Include varasm.h.
2770 Include attribs.h.
2771 Include stringpool.h.
2772 * c-lang.c: Include fold-const.h.
2773 * c-parser.c: Include stringpool.h.
2774 Include attribs.h.
2775 Include stor-layout.h.
2776 Include varasm.h.
2777 Include trans-mem.h.
2778 * c-typeck.c: Include stor-layout.h.
2779 Include trans-mem.h.
2780 Include varasm.h.
2781 Include stmt.h.
2782
38b7bc7f
JM
27832013-11-13 Joseph Myers <joseph@codesourcery.com>
2784
2785 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2786 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2787 __auto_type.
2788 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2789 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2790 RID_AUTO_TYPE.
2791 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2792 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2793 (c_parser_declarator, c_parser_direct_declarator_inner)
2794 (c_parser_parameter_declaration, c_parser_type_name): All callers
2795 changed.
2796 (c_parser_declaration_or_fndef): Handle declarations with type
2797 determined from the initializer.
2798
45b0be94
AM
27992013-11-12 Andrew MacLeod <amacleod@redhat.com>
2800
18f429e2 2801 * c-typeck.c: Include gimplify.h.
45b0be94 2802
582d9b50
JM
28032013-11-12 Joseph Myers <joseph@codesourcery.com>
2804
2805 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2806 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2807 comment.
2808 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2809 or _Thread_local as appropriate in diagnostics.
2810 (build_null_declspecs): Initialize ret->thread_gnu_p.
2811 (declspecs_add_scspec): Handle either __thread or _Thread_local
2812 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2813 pedantic. Do not disallow _Thread_local extern and _Thread_local
2814 static.
2815
267bac10
JM
28162013-11-07 Joseph Myers <joseph@codesourcery.com>
2817 Andrew MacLeod <amacleod@redhat.com>
2818
2819 * c-aux-info.c (gen_type): Handle atomic qualifier.
2820 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2821 qualifiers when compating types.
2822 (shadow_tag_warned): Handle atomic_p in declspecs.
2823 (quals_from_declspecs): Likewise.
2824 (start_decl): Use c_type_promotes_to when promoting argument
2825 types.
2826 (grokdeclarator): Handle _Atomic.
2827 (get_parm_info): Diagnose any qualifier on "void" as only
2828 parameter.
2829 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2830 comparing types. Use c_type_promotes_to when promoting argument
2831 types.
2832 (finish_function): Use c_type_promotes_to when promoting argument
2833 types.
2834 (build_null_declspecs): Handle atomic_p in declspecs.
2835 (declspecs_add_qual): Handle RID_ATOMIC.
2836 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2837 (c_token_starts_declspecs): Handle RID_ATOMIC.
2838 (c_parser_declspecs): Handle atomic type specifiers and
2839 qualifiers.
2840 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2841 from types of expressions with atomic type.
2842 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2843 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2844 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2845 (c_parser_statement_after_labels, c_parser_switch_statement)
2846 (c_parser_for_statement, c_parser_expr_no_commas)
2847 (c_parser_conditional_expression, c_parser_binary_expression)
2848 (c_parser_cast_expression, c_parser_unary_expression)
2849 (c_parser_postfix_expression)
2850 (c_parser_postfix_expression_after_primary, c_parser_expression):
2851 Use convert_lvalue_to_rvalue.
2852 (c_parser_expression_conv, c_parser_expr_list): Document
2853 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2854 (c_parser_objc_synchronized_statement): Use
2855 convert_lvalue_to_rvalue.
2856 (c_parser_objc_selector): Handle RID_ATOMIC.
2857 (c_parser_objc_receiver, c_parser_array_notation): Use
2858 convert_lvalue_to_rvalue.
2859 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2860 _Atomic (type-name).
2861 (struct c_declspecs): Add atomic_p field.
2862 (convert_lvalue_to_rvalue): Declare.
2863 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2864 corresponding atomic types.
2865 (qualify_type): Don't add _Atomic qualifiers from second argument.
2866 (comp_target_types): Do not allow _Atomic mismatches.
2867 (type_lists_compatible_p): Do not remove atomic qualifiers when
2868 comparing types.
2869 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2870 (build_atomic_assign): New functions.
2871 (build_unary_op): Use build_atomic_assign for atomic increment and
2872 decrement.
2873 (build_conditional_expr): Do not treat _Atomic void as a qualified
2874 version of void.
2875 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2876 (find_anonymous_field_with_type, convert_to_anonymous_field)
2877 (convert_for_assignment): Do not remove atomic qualifiers when
2878 comparing types.
2879 (digest_init): Do not accept initialization of arrays of atomic
2880 elements by string constants.
2881 (build_asm_expr): Use convert_lvalue_to_rvalue.
2882 (build_binary_op): Do not treat _Atomic void as a qualified
2883 version of void.
2884
0c249d4b
DD
28852013-11-06 DJ Delorie <dj@redhat.com>
2886
2887 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2888 both explicit and builtin, print the location of the explicit one.
2889
6d7f7e0a
TB
28902013-11-05 Tobias Burnus <burnus@net-b.de>
2891
2892 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2893 c_parser_omp_distribute, c_parser_omp_teams,
2894 c_parser_omp_target, c_parser_omp_declare): Handle
2895 -fopenmp-simd.
2896
b906f4ca
MP
28972013-11-03 Marek Polacek <polacek@redhat.com>
2898
2899 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2900
ee1d5a02
JJ
29012013-11-01 Jakub Jelinek <jakub@redhat.com>
2902
2903 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2904 check_dup_generic at the end, unless remove is true.
2905 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2906 remove = true;.
2907 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2908
5a9785fb
JJ
29092013-10-31 Jakub Jelinek <jakub@redhat.com>
2910
2911 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2912 with decl that is not pointer nor array.
2913
939b37da
BI
29142013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2915
2916 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2917 a spawning function is found.
2918 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2919 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2920 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2921 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2922 case.
2923 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2924 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2925 expr.
2926 (c_finish_return): Added a check to reject _Cilk_spawn in return
2927 expression.
2928 (build_cilk_spawn): New function.
2929 (build_cilk_sync): Likewise.
2930 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2931
d4af74d4
TB
29322013-10-27 Tobias Burnus <burnus@net-b.de>
2933
2934 PR other/33426
2935 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2936 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2937 (c_parser_statement_after_labels): Update calls.
2938
d73749df 29392013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2940
2941 PR other/33426
2942 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2943 Handle PRAGMA_IVDEP.
2944 (c_parser_statement_after_labels): Update call.
2945
f28aa681
MP
29462013-10-24 Marek Polacek <polacek@redhat.com>
2947
2948 * c-parser.c (c_parser_struct_declaration): Add a comment.
2949 (c_parser_declarator): Don't allow _Alignas here.
2950
0645c1a2
AM
29512013-10-17 Andrew MacLeod <amacleod@redhat.com>
2952
2953 * c-parser.c: Include omp-low.h.
2954 * c-typeck.c: Likewise.
2955
568a31f2
MP
29562013-10-17 Marek Polacek <polacek@redhat.com>
2957
2958 PR c/58267
2959 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2960 Document syntax of the array-declarator.
2961 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2962 are not permitted.
2963 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2964 (c_parser_struct_declaration): Likewise.
2965 (c_parser_declarator): Likewise.
2966 (c_parser_direct_declarator_inner): Likewise.
2967 (c_parser_parameter_declaration): Likewise.
2968 (c_parser_type_name): Likewise.
2969
acf0174b
JJ
29702013-10-11 Jakub Jelinek <jakub@redhat.com>
2971
2972 * c-lang.h (current_omp_declare_target_attribute): New extern
2973 decl.
2974 * c-parser.c: Include c-lang.h.
2975 (struct c_parser): Change tokens to c_token *.
2976 Add tokens_buf field. Change tokens_avail type to unsigned int.
2977 (c_parser_consume_token): If parser->tokens isn't
2978 &parser->tokens_buf[0], increment parser->tokens.
2979 (c_parser_consume_pragma): Likewise.
2980 (enum pragma_context): Add pragma_struct and pragma_param.
2981 (c_parser_external_declaration): Adjust
2982 c_parser_declaration_or_fndef caller.
2983 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2984 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2985 Adjust recursive call.
2986 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2987 of pragma_external.
2988 (c_parser_parameter_declaration): Use pragma_param instead of
2989 pragma_external.
2990 (c_parser_compound_statement_nostart, c_parser_label,
2991 c_parser_for_statement): Adjust
2992 c_parser_declaration_or_fndef callers.
2993 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2994 it through to c_parser_conditional_expression.
2995 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2996 pass it through to c_parser_binary_expression. Adjust recursive
2997 call.
2998 (c_parser_binary_expression): Remove prec argument, add
2999 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3000 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3001 binop matches it, use build2 instead of parser_build_binary_op.
3002 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3003 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3004 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3005 Handle pragma_struct and pragma_param the same as pragma_external.
3006 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3007 (c_parser_omp_variable_list): Parse array sections for
3008 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3009 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3010 (c_parser_omp_clause_reduction): Handle user defined reductions.
3011 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3012 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3013 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3014 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3015 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3016 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3017 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3018 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3019 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3020 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3021 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3022 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3023 (c_parser_omp_for_loop): Add CODE argument, pass it through
3024 to c_finish_omp_for. Change last argument to cclauses,
3025 and adjust uses to grab parallel clauses from the array of all
3026 the split clauses. Adjust c_parser_binary_expression,
3027 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3028 (omp_split_clauses): New function.
3029 (c_parser_omp_simd): New function.
3030 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3031 Allow the function to be called also when parsing combined constructs,
3032 and call c_parser_omp_simd when parsing for simd.
3033 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3034 #pragma omp section, require exactly one structured-block instead of
3035 sequence of statements.
3036 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3037 Allow the function to be called also when parsing combined constructs.
3038 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3039 Allow the function to be called also when parsing combined
3040 constructs.
3041 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3042 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3043 c_parser_omp_teams, c_parser_omp_target_data,
3044 c_parser_omp_target_update, c_parser_omp_target,
3045 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3046 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3047 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3048 (c_parser_omp_construct): Add p_name and mask vars. Handle
3049 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3050 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3051 and c_parser_omp_sections callers.
3052 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3053 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3054 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3055 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3056 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3057 OMP_CLAUSE_DEPEND.
3058 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3059 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3060 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3061 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3062 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3063 * c-typeck.c: Include tree-inline.h.
3064 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3065 handle_omp_array_sections_1, handle_omp_array_sections,
3066 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3067 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3068 user defined reductions.
3069 (c_tree_equal): New function.
3070 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3071 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3072 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3073 c_check_omp_declare_reduction_r): New prototypes.
3074 * c-decl.c (current_omp_declare_target_attribute): New variable.
3075 (c_decl_attributes): New function.
3076 (start_decl, start_function): Use it instead of decl_attributes.
3077 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3078 c_omp_reduction_decl, c_omp_reduction_lookup,
3079 c_check_omp_declare_reduction_r): New functions.
3080
0a6c2227
TT
30812013-09-25 Tom Tromey <tromey@redhat.com>
3082
3083 * Make-lang.in (c/gccspec.o): Remove.
3084 (CFLAGS-c/gccspec.o): New variable.
3085 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3086 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3087 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3088
f3bc55f0
TT
30892013-09-25 Tom Tromey <tromey@redhat.com>
3090
3091 * Make-lang.in (c/gccspec.o): Don't use subshell.
3092
a24d975c
MP
30932013-09-18 Marek Polacek <polacek@redhat.com>
3094
3095 PR sanitize/58443
3096 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3097 Remove unnecessary check.
3098
ce6923c5
MP
30992013-09-18 Marek Polacek <polacek@redhat.com>
3100
3101 PR sanitizer/58411
3102 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3103 no_sanitize_undefined attribute.
3104
a1e51df9
KT
31052013-09-13 Kai Tietz <ktietz@redhat.com>
3106
3107 PR target/57848
3108 * c-decl.c (c_builtin_function_ext_scope): Remove
3109 wrong assumption that it is never called on prexisting
3110 symbol.
3111
0af94e6f
JR
31122013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3113
3114 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3115
20059c8b
GDR
31162013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3117
3118 * c-objc-common.c (c_tree_printer): Tidy.
3119
de5a5fa1
MP
31202013-08-30 Marek Polacek <polacek@redhat.com>
3121
3122 * c-typeck.c (build_binary_op): Add division by zero and shift
3123 instrumentation.
3124
2531a1d9 31252013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3126 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3127
6e2bcc98 3128 PR c/35649
2531a1d9
JR
3129 * c-typeck.c (c_common_type): Prefer double_type_node over
3130 other REAL_TYPE types with the same precision.
3131 (convert_arguments): Likewise.
3132
025311c4
GDR
31332013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3134
3135 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3136 (c_initialize_diagnostics): Call a destructor for the early printer.
3137
da6ca2b5
GDR
31382013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3139
3140 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3141 printer initialization.
3142
318cda85 31432013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3144
318cda85
BI
3145 PR c/57490
3146 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3147 check for truth values.
3148 (expand_array_notation_exprs): Added truth values case. Removed an
3149 unwanted else. Added for-loop to walk through subtrees in default
3150 case.
3151
b066401f
GDR
31522013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3153
3154 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3155
fb48aadc
JM
31562013-07-23 Joseph Myers <joseph@codesourcery.com>
3157
3158 * c-parser.c (struct c_generic_association): Fix typo.
3159
433cc7b0
TT
31602013-07-23 Tom Tromey <tromey@redhat.com>
3161 Joseph Myers <joseph@codesourcery.com>
3162
3163 * c-parser.c (struct c_generic_association): New.
3164 (c_generic_association_d): New typedef.
3165 (c_parser_generic_selection): New function.
3166 (c_parser_postfix_expression): Handle RID_GENERIC.
3167
26d40c3d
JM
31682013-07-13 Jason Merrill <jason@redhat.com>
3169
3170 PR c++/57793
3171 * c-decl.c (finish_struct): Check for too-large class.
3172
ecdbd01a 31732013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3174
3175 PR c/57821
3176 * c-typeck.c (set_init_index): When folding, check for index overflow.
3177
1141ed3f
BI
31782013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3179
3180 * c-parser.c (c_parser_array_notation): Removed rejection of array
3181 notations in an array of function pointers.
3182
713b46fa
BI
31832013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3184
3185 * c-array-notation.c (make_triplet_val_inv): New function.
3186 (create_cmp_incr): Likewise.
3187 (create_array_refs): Likewise.
3188 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3189 Also modularized common parts between functions and called the function.
3190 (build_array_notation_expr): Likewise.
3191 (fix_conditional_array_notations_1): Likewise.
3192 (fix_array_notation_expr): Likewise.
3193 (fix_array_notation_call_expr): Likewise.
3194
92f20202
MP
31952013-06-18 Marek Polacek <polacek@redhat.com>
3196
3197 PR c/57630
3198 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3199
73a23b06
BI
32002013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3201
3202 * c-array-notation.c (build_array_notation_expr): Reject array notation
3203 mismatch between LHS and RHS even inside a call_expr. Also, removed
3204 a couple while statements that were dead code.
3205
00b8517d
BI
32062013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3207
3208 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3209 excessive precision expressions in function parameters. Also removed
3210 couple unwanted while statements.
3211
1509bdda
BI
32122013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3213
3214 * c-array-notation.c (expand_array_notation_exprs): Added
3215 ARRAY_NOTATION_REF case.
3216
d60f1706
BI
32172013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3218
3219 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3220 function to c-family/array-notation-common.c.
3221 (is_cilkplus_reduce_builtin): Likewise.
3222 (find_rank): Likewise.
3223 (extract_array_notation_exprs): Likewise.
3224 (replace_array_notations): Likewise.
3225 (find_inv_trees): Likewise.
3226 (replace_inv_trees): Likewise.
3227 (contains_array_notation_expr): Likewise.
3228 (find_correct_array_notation_type): Likewise.
3229 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3230 (struct inv_list): Moved this to c-family/array-notation-common.c.
3231 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3232
6d6efbb3
BI
32332013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3234
3235 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3236 reduction functions outside the for-loop. Added a check if the fundecl
3237 is non-NULL. Finally, removed an unwanted if-statement, and made the
3238 body unconditional.
3239
25c22937
BI
32402013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3241
3242 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3243 condition of the if-statement matches the rank of else-block and then-
3244 block when array notations are used.
3245 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3246 expression after the entire function body is parsed.
3247 (c_parser_expr_no_commas): Delayed creating array notation expressions
3248 to the end of function parsing.
3249 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3250 whole if-statement instead of just the condition.
3251 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3252
edd25645
BI
32532013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3254
3255 PR c/57474
3256 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3257 array to NULL_TREE if they are unused. Also added a check for the
3258 field to be NULL before its fields are used in future.
3259
065ce7f1
RO
32602013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3261
3262 PR bootstrap/57450
3263 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3264 (build_array_notation_expr): Likewise.
3265
36536d79
BI
32662013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3267
3268 * c-typeck.c (build_array_ref): Added a check to see if array's
3269 index is greater than one. If true, then emit an error.
3270 (build_function_call_vec): Exclude error reporting and checking
3271 for builtin array-notation functions.
3272 (convert_arguments): Likewise.
3273 (c_finish_return): Added a check for array notations as a return
3274 expression. If true, then emit an error.
3275 (c_finish_loop): Added a check for array notations in a loop
3276 condition. If true then emit an error.
3277 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3278 (build_binary_op): Added a check for array notation expr inside
3279 op1 and op0. If present, we call another function to find correct
3280 type.
3281 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3282 * c-parser.c (c_parser_compound_statement): Check if array
3283 notation code is used in tree, if so, then transform them into
3284 appropriate C code.
3285 (c_parser_expr_no_commas): Check if array notation is used in LHS
3286 or RHS, if so, then build array notation expression instead of
3287 regular modify.
3288 (c_parser_postfix_expression_after_primary): Added a check for
3289 colon(s) after square braces, if so then handle it like an array
3290 notation. Also, break up array notations in unary op if found.
3291 (c_parser_direct_declarator_inner): Added a check for array
3292 notation.
3293 (c_parser_compound_statement): Added a check for array notation in
3294 a stmt. If one is present, then expand array notation expr.
3295 (c_parser_if_statement): Likewise.
3296 (c_parser_switch_statement): Added a check for array notations in
3297 a switch statement's condition. If true, then output an error.
3298 (c_parser_while_statement): Similarly, but for a while.
3299 (c_parser_do_statement): Similarly, but for a do-while.
3300 (c_parser_for_statement): Similarly, but for a for-loop.
3301 (c_parser_unary_expression): Check if array notation is used in a
3302 pre-increment or pre-decrement expression. If true, then expand
3303 them.
3304 (c_parser_array_notation): New function.
3305 * c-array-notation.c: New file.
3306 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3307
cd192ccc
MS
33082013-05-23 Mike Stump <mikestump@comcast.net>
3309
3310 * c-typeck.c (convert_for_assignment): Handle references to memory
3311 spaces better.
3312
427b248d
JM
33132013-05-16 Jason Merrill <jason@redhat.com>
3314
3315 * Make-lang.in (cc1$(exeext)): Use link mutex.
3316
44d90fe1
PC
33172013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3318
3319 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3320 to simply use OPT_Wpointer_arith.
3321 (build_unary_op): Likewise.
3322
4e7d7b3d
JJ
33232013-04-03 Jakub Jelinek <jakub@redhat.com>
3324
3325 PR c/19449
3326 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3327 argument. If set, or it temporarily for parsing of the first
3328 argument into force_folding_builtin_constant_p.
3329 (c_parser_postfix_expression): Adjust callers.
3330
839b422f
RB
33312013-03-21 Richard Biener <rguenther@suse.de>
3332
3333 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3334 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3335
2ee028f1
MP
33362013-02-12 Marek Polacek <polacek@redhat.com>
3337
3338 PR c/44938
3339 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3340 origtypes to NULL.
3341
8824edff
JJ
33422013-01-24 Jakub Jelinek <jakub@redhat.com>
3343
3344 PR c/56078
3345 * c-typeck.c (set_nonincremental_init_from_string): If
3346 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3347 returned false.
3348 (process_init_element): Likewise.
3349
eadd3d0d
JJ
33502012-12-20 Jakub Jelinek <jakub@redhat.com>
3351
3352 PR c++/55619
3353 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3354 argument, don't call default_function_array_conversion
3355 nor c_fully_fold here.
3356 (c_parser_asm_statement): Adjust callers.
3357 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3358 and outputs here, and call default_function_array_conversion
3359 on inputs that don't need to be addressable.
3360
f8a93a2e
JJ
33612012-12-18 Jakub Jelinek <jakub@redhat.com>
3362
3363 PR c/39464
3364 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3365 warning require that both c_common_unsigned_type as well as
3366 c_common_signed_type is the same for both mvl and mvr types.
3367
9771b263
DN
33682012-11-16 Diego Novillo <dnovillo@google.com>
3369
3370 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3371
3372 * c-common.c: Use new vec API in vec.h.
3373 * c-common.h: Likewise.
3374 * c-gimplify.c: Likewise.
3375 * c-pragma.c: Likewise.
3376 * c-pretty-print.c: Likewise.
3377 * c-pretty-print.h: Likewise.
3378 * c-semantics.c: Likewise.
3379 * c-decl.c: Likewise.
3380 * c-parser.c: Likewise.
3381 * c-tree.h: Likewise.
3382 * c-typeck.c: Likewise.
3383
880661a4
JW
33842012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3385
3386 PR c++/54930
3387 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3388
077d1abe
MLI
33892012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3390
3391 PR c/53066
3392 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3393 shadows a function, unless the variable is a function or a
3394 pointer-to-function.
3395
3a785c97
JJ
33962012-10-12 Jakub Jelinek <jakub@redhat.com>
3397
3398 PR c/54381
3399 * c-parser.c (struct c_tree_loc_pair): Removed.
3400 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3401 add location_t * and tree * arguments, fill in array of 3
3402 sizeof_arg trees and corresponding locs.
3403 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3404 c_parser_expr_list callers.
3405 (c_parser_postfix_expression_after_primary): Likewise. Pass
3406 array of 3 sizeof_arg trees and locs (corresponding to first
3407 3 arguments) to sizeof_pointer_memaccess_warning.
3408
703c8606
LC
34092012-10-09 Lawrence Crowl <crowl@google.com>
3410
3411 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3412 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3413 hash table.
3414
5d9de0d0
PC
34152012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3416
3417 PR c++/54194
3418 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3419 call.
3420
a212e43f
MG
34212012-10-09 Marc Glisse <marc.glisse@inria.fr>
3422
3423 PR c++/54427
3424 * c-typeck.c: Include c-common.h.
3425 (enum stv_conv): Moved to c-common.h.
3426 (scalar_to_vector): Moved to c-common.c.
3427 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3428 * Make-lang.in: c-typeck.c depends on c-common.h.
3429
3b78de56
AC
34302012-10-04 Arnaud Charlet <charlet@adacore.com>
3431
3432 * c-decl.c (c_write_global_declarations): Fix handling of
3433 -fdump-ada-spec*.
3434
78c60e3d
SS
34352012-09-30 Sharad Singhai <singhai@google.com>
3436
3437 * c-decl.c (c_write_global_declarations): Use a different method
3438 to determine if the dump has ben initialized.
3439
9f33203d
JM
34402012-09-14 Joseph Myers <joseph@codesourcery.com>
3441
3442 PR c/54552
3443 * c-typeck.c (c_cast_expr): When casting to a type requiring
3444 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3445 c_fully_fold first.
3446
a27d595d
JM
34472012-09-14 Joseph Myers <joseph@codesourcery.com>
3448
3449 PR c/54103
3450 * c-typeck.c (build_unary_op): Pass original argument of
3451 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3452 any C_MAYBE_CONST_EXPR, if it has integer operands.
3453 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3454 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3455 to c_objc_common_truthvalue_conversion, then remove any
3456 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3457 c_objc_common_truthvalue_conversion not
3458 c_common_truthvalue_conversion.
3459 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3460 call note_integer_operands for arguments with integer operands
3461 that are not integer constants.
3462
9feb29df
JJ
34632012-09-13 Jakub Jelinek <jakub@redhat.com>
3464
3465 PR c/54559
3466 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3467 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3468
d409320c
JJ
34692012-08-31 Jakub Jelinek <jakub@redhat.com>
3470
3471 PR c/54428
3472 * c-convert.c (convert): Don't call fold_convert_loc if
3473 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3474 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3475 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3476
6265d07c
JJ
34772012-08-24 Jakub Jelinek <jakub@redhat.com>
3478
3479 PR c/54355
3480 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3481 for nested and empty_ok arguments in the call to
3482 c_parser_declaration_or_fndef.
3483
1a4049e7
JJ
34842012-08-17 Jakub Jelinek <jakub@redhat.com>
3485
3486 * c-tree.h (c_last_sizeof_arg): Declare.
3487 * c-parser.c (struct c_tree_loc_pair): New type.
3488 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3489 non-NULL.
3490 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3491 (c_parser_postfix_expression_after_primary): Likewise. Call
3492 sizeof_pointer_memaccess_warning if needed.
3493 (sizeof_ptr_memacc_comptypes): New function.
3494 * c-typeck.c (c_last_sizeof_arg): New global variable.
3495 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3496
0229aee9
UB
34972012-07-24 Uros Bizjak <ubizjak@gmail.com>
3498
3499 * c-lang.h (lang_decl): Add variable_size GTY option.
3500
7ee2468b
SB
35012012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3502
3503 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3504 * Make-lang.in: Fix dependencies.
3505
d4a10d0a
SB
35062012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3507
3508 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3509 and add language Makefile hooks.
3510 * config-lang.in: New file.
3511 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3512 add the required "normal" config-lang.in rules.
3513 * c-lang.h: Moved from gcc/ to here.
3514 * c-tree.h: Likewise.
3515 * c-objc-common.c: Likewise.
3516 * c-objc-common.h: Likewise.
3517 * c-typeck.c: Likewise.
3518 * c-convert.c: Likewise.
3519 * c-lang.c: Likewise.
3520 * c-aux-info.c: Likewise.
3521 * c-errors.c: Likewise.
3522 * gccspec.c: Likewise.
3523 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3524 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3525\f
818ab71a 3526Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3527
3528Copying and distribution of this file, with or without modification,
3529are permitted in any medium without royalty provided the copyright
3530notice and this notice are preserved.
This page took 1.431867 seconds and 5 git commands to generate.