]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
PR c++/70847
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
e4b92538 12016-06-06 Marek Polacek <polacek@redhat.com>
2
3 * c-typeck.c (comptypes_internal): Handle comparisons of
4 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5 TYPE_REF_CAN_ALIAS_ALL.
6
2234363c 72016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
8
9 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
10 arguments as addressable when async clause exists.
11
b6431756 122016-05-30 Jakub Jelinek <jakub@redhat.com>
13
14 PR c++/71349
15 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
16 when combined with target construct.
17
6feab9ce 182016-05-26 Jakub Jelinek <jakub@redhat.com>
19
20 * c-parser.c (c_parser_omp_clause_schedule): Warn if
21 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
22
2c995da9 232016-05-25 Marek Polacek <polacek@redhat.com>
24
25 PR c/71265
26 * c-decl.c (c_make_fname_decl): Don't check seen_error.
27
abfbb5b5 28 PR c/71266
29 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
30
6d6a3fc3 312016-05-24 Cesar Philippidis <cesar@codesourcery.com>
32
33 * c-parser.c (c_parser_oacc_declare): Add support for
34 GOMP_MAP_FIRSTPRIVATE_POINTER.
35 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
36 argument with enum c_omp_region_type ort.
37 (handle_omp_array_sections): Likewise. Update call to
38 handle_omp_array_sections_1.
39 (c_finish_omp_clauses): Add specific errors and warning messages for
40 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
41 call to handle_omp_array_sections.
42
c9d624bd 432016-05-24 Thomas Schwinge <thomas@codesourcery.com>
44
45 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
46
7345b977 472016-05-24 Richard Biener <rguenther@suse.de>
48
49 PR middle-end/70434
50 PR c/69504
51 * c-typeck.c (build_array_ref): Do not complain about indexing
52 non-lvalue vectors. Adjust for function name change.
53
8bdfbc08 542016-05-20 Martin Sebor <msebor@redhat.com>
55
56 PR c/71115
57 * c-typeck.c (error_init): Use
58 expansion_point_location_if_in_system_header.
59 (warning_init): Same.
60
97c71d71 612016-05-19 David Malcolm <dmalcolm@redhat.com>
62
63 PR c/71171
64 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
65 in error-handling.
66 (c_parser_postfix_expression): Likewise.
67 * c-tree.h (c_expr::set_error): New method.
68 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
69 that result's range is initialized.
70
e68d7b49 712016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
72
73 * c-typeck.c (parser_build_unary_op): Fix formatting.
74
624115b4 752016-05-16 Matthew Wahab <matthew.wahab@arm.com>
76
77 * c-decl.c (grokdeclarator): Remove errmsg and use of
78 targetm.invalid_return_type.
79 (grokparms): Remove errmsg and use of
80 targetm.invalid_parameter_type.
81
90c88567 822016-05-13 Joseph Myers <joseph@codesourcery.com>
83
84 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
85 function return type.
86
22a3f7bd 872016-05-12 Marek Polacek <polacek@redhat.com>
88
89 PR c/70756
90 * c-decl.c (build_compound_literal): Pass LOC down to
91 c_incomplete_type_error.
92 * c-tree.h (require_complete_type): Adjust declaration.
93 (c_incomplete_type_error): Likewise.
94 * c-typeck.c (require_complete_type): Add location parameter, pass it
95 down to c_incomplete_type_error.
96 (c_incomplete_type_error): Add location parameter, pass it down to
97 error_at.
98 (build_component_ref): Pass location down to c_incomplete_type_error.
99 (default_conversion): Pass location down to require_complete_type.
100 (build_array_ref): Likewise.
101 (build_function_call_vec): Likewise.
102 (convert_arguments): Likewise.
103 (build_unary_op): Likewise.
104 (build_c_cast): Likewise.
105 (build_modify_expr): Likewise.
106 (convert_for_assignment): Likewise.
107 (c_finish_omp_clauses): Likewise.
108
54c4d22e 1092016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
110
111 PR c/43651
112 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
113 is enabled.
114 * c-errors.c (pedwarn_c90): Return true if warned.
115 * c-tree.h (pedwarn_c90): Change return type to bool.
116 (enum c_declspec_word): Add new enumerator cdw_atomic.
117
7f8012a5 1182016-05-11 Marek Polacek <polacek@redhat.com>
119
120 PR c++/71024
121 * c-decl.c (diagnose_mismatched_decls): Factor out code to
122 diagnose_mismatched_attributes and call it.
123
3fa82609 1242016-05-10 Marek Polacek <polacek@redhat.com>
125
126 PR c/70255
127 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
128 on a declaration following the definition.
129
871164c4 1302016-05-05 Jakub Jelinek <jakub@redhat.com>
131
132 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
133 parse it through to c_parser_c99_block_statement.
134 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
135 caller.
136
1d52c456 1372016-05-04 Marek Polacek <polacek@redhat.com>
138
139 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
140 OPT_Wdangling_else.
141
a64030fe 1422016-05-04 Marek Polacek <polacek@redhat.com>
143
144 PR c/48778
145 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
146 for macro expansions.
147
5d4db8ef 1482016-05-03 Marek Polacek <polacek@redhat.com>
149
150 PR c/70859
151 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
152 check_builtin_function_arguments.
153
0bd2fc6e 1542016-05-03 Richard Biener <rguenther@suse.de>
155
156 * Make-lang.in (cc1-checksum.c): For stage-final re-use
157 the checksum from the previous stage.
158
b5e88f74 1592016-05-02 Cesar Philippidis <cesar@codesourcery.com>
160
161 * c-parser.c (c_parser_oacc_all_clauses): Update call to
162 c_finish_omp_clauses.
163 (c_parser_omp_all_clauses): Likewise.
164 (c_parser_oacc_cache): Likewise.
165 (c_parser_oacc_loop): Likewise.
166 (omp_split_clauses): Likewise.
167 (c_parser_omp_declare_target): Likewise.
168 (c_parser_cilk_all_clauses): Likewise.
169 (c_parser_cilk_for): Likewise.
170 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
171 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
172
dd185f6e 1732016-05-02 Marek Polacek <polacek@redhat.com>
174
175 PR c/70851
176 * c-decl.c (grokdeclarator): Diagnose when array's size has an
177 incomplete type.
178
4d0a8bac 1792016-04-29 Cesar Philippidis <cesar@codesourcery.com>
180
181 PR middle-end/70626
182 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
183 OACC_LOOP_CLAUSE_MASK.
184 (c_parser_oacc_kernels_parallel): Update call to
185 c_oacc_split_loop_clauses.
186
d215eeca 1872016-04-28 Andrew MacLeod <amacleod@redhat.com>
188
189 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
190 argument to build_modify_expr in two cases.
191
40385231 1922016-04-27 Bernd Schmidt <bschmidt@redhat.com>
193
194 * c-parser.c (c_parser_postfix_expression_after_primary): Call
195 warn_for_memset instead of warning directly here.
196
fa20ebd3 1972016-04-26 Marek Polacek <polacek@redhat.com>
198
199 PR c/67784
200 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
201 out of ...
202 (c_parser_for_statement): ... here.
203 (c_parser_if_statement): Use it.
204 (c_parser_switch_statement): Use it.
205 (c_parser_while_statement): Use it.
206
9db47803 207 PR c/70791
208 * c-decl.c (pushdecl): Pass LOCUS down to warning.
209
70574e60 2102016-04-20 Ilya Verbin <ilya.verbin@intel.com>
211
212 PR c++/69363
213 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
214 instead of c_finish_cilk_clauses.
215 * c-tree.h (c_finish_omp_clauses): Add new default argument.
216 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
217 floating-point variables in the linear clause for Cilk Plus.
218
5d4b30ea 2192016-04-18 Michael Matz <matz@suse.de>
220
221 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
222 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
223
eac243e7 2242016-04-15 Marek Polacek <polacek@redhat.com>
225
226 PR c/70671
227 * c-typeck.c (build_unary_op): Pass location down to error and
228 warning call.
229
b4ba8358 2302016-04-15 Jakub Jelinek <jakub@redhat.com>
231
232 PR c/70436
233 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
234 where needed.
235 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
236 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
237 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
238 Adjust c_parser_pragma callers.
239 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
240 caller.
241 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
242 c_parser_statement.
243 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
244 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
245 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
246 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
247 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
248 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
249 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
250 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
251 down where needed.
252 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
253 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
254 calls.
255
0241e4dc 2562016-04-13 Marek Polacek <polacek@redhat.com>
257
258 PR c/70436
259 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
260 adjust callers.
261 (c_parser_statement): Likewise.
262 (c_parser_c99_block_statement): Likewise.
263 (c_parser_while_statement): Likewise.
264 (c_parser_for_statement): Likewise.
265 (c_parser_if_body): Don't set IF_P here.
266 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
267 about dangling else here.
268 * c-tree.h (c_finish_if_stmt): Adjust declaration.
269 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
270 warn about dangling else here.
271
c4f5465d 2722016-04-04 Marek Polacek <polacek@redhat.com>
273
274 PR c/70307
275 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
276
7952b661 2772016-03-31 Marek Polacek <polacek@redhat.com>
278
279 PR c/70297
280 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
281
5539bc70 2822016-03-18 David Malcolm <dmalcolm@redhat.com>
283
284 PR c/70281
285 * c-parser.c (c_parser_postfix_expression): Set the source range
286 for uses of "__builtin_types_compatible_p".
287
29a514fa 2882016-03-17 Jakub Jelinek <jakub@redhat.com>
289
290 PR c/70280
291 * c-typeck.c (composite_type): Don't count void_list_node
292 into len, if the list is terminated by void_list_node, start
293 with void_list_node instead of NULL for newargs. Stop
294 at void_list_node.
295
462ca422 2962016-03-16 Marek Polacek <polacek@redhat.com>
297
298 PR c/70093
299 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
300 nested functions returning VM types.
301
27dcb7a8 3022016-03-09 Cesar Philippidis <cesar@codesourcery.com>
303
304 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
305 when calling c_finish_omp_clauses.
306
2d1d2e55 3072016-03-04 Bernd Schmidt <bschmidt@redhat.com>
308
309 PR c/69824
310 * c-decl.c (get_parm_info): Don't queue implicit function declarations
311 for later.
312
6560d1ad 3132016-03-04 Marek Polacek <polacek@redhat.com>
314
315 PR c/69798
316 * c-parser.c (c_parser_postfix_expression): Call
317 c_parser_cast_expression rather than c_parser_postfix_expression.
318
40e9ce2d 3192016-03-01 Jakub Jelinek <jakub@redhat.com>
320
321 PR c/69796
322 PR c/69974
323 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
324 of incomplete decls to error_mark_node.
325
f0ea75d1 3262016-02-24 Marek Polacek <polacek@redhat.com>
327
328 PR c/69819
329 * c-decl.c (finish_decl): Don't update the copy of the type of a
330 different decl type.
331
d41ab738 3322016-02-23 Jakub Jelinek <jakub@redhat.com>
333
334 PR objc/69844
335 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
336 in id_kind reclassification.
337
7675e968 3382016-02-16 Jakub Jelinek <jakub@redhat.com>
339
340 PR c/69835
341 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
342
28072426 3432016-02-16 James Norris <jnorris@codesourcery.com>
344
345 PR c/64748
346 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
347
74a4140f 3482016-02-12 Bernd Schmidt <bschmidt@redhat.com>
349
7c25ed5c 350 * c-decl.c (build_null_declspecs): Zero the entire struct.
351
74a4140f 352 PR c/69522
353 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
354 callers changed. If nested_p is true, use it to call
355 finish_implicit_inits.
356 * c-tree.h (finish_implicit_inits): Declare.
357 * c-typeck.c (finish_implicit_inits): New function. Move code
358 from ...
359 (push_init_level): ... here.
360 (set_designator, process_init_element): Call finish_implicit_inits.
361
40b38ace 3622016-02-11 Jakub Jelinek <jakub@redhat.com>
363
364 PR c/69768
365 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
366 arguments for -Waddress warning.
367
6b098e91 3682016-02-04 Jakub Jelinek <jakub@redhat.com>
369
370 PR c/69669
371 * c-decl.c (finish_enum): When honoring mode attribute,
372 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
373
ff5e28e9 3742016-01-29 Jakub Jelinek <jakub@redhat.com>
375
376 PR debug/69518
377 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
378 all type variants, not just TYPE_MAIN_VARIANT.
379
78e516eb 3802016-01-27 Jakub Jelinek <jakub@redhat.com>
381
382 PR debug/66869
383 * c-decl.c (c_write_global_declarations_1): Warn with
384 warn_unused_function if static prototype without definition
385 is not C_DECL_USED.
386
fee5e491 3872016-01-27 Marek Polacek <polacek@redhat.com>
388
389 PR c/68062
390 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
391 to unsigned, if needed. Add -Wsign-compare warning.
392
9bbfd060 3932016-01-26 Jakub Jelinek <jakub@redhat.com>
394
395 PR tree-optimization/69483
396 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
397
6ebc6587 3982016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16d4186f 399
400 PR c/24293
401 * c-tree.h (incomplete_record_decls): Declare.
402 * c-parser.c (incomplete_record_decls): Define.
403 (c_parser_translation_unit): Iterate through incomplete_record_decls and
404 report error if any decl has zero size.
405 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
406 or enum type to incomplete_record_decls.
407
4c39e3a5 4082016-01-14 Tom de Vries <tom@codesourcery.com>
409
410 PR tree-optimization/68773
411 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
412 set force_output.
413
77f35cec 4142016-01-14 Marek Polacek <polacek@redhat.com>
415
416 PR c/69262
417 * c-decl.c (grokdeclarator): Provide more information for invalid
418 array declarations.
419
d74214f3 4202016-01-06 David Malcolm <dmalcolm@redhat.com>
421
422 * c-parser.c (c_parser_unary_expression): For dereferences, build
423 a combined location before calling build_indirect_ref, so that
424 error reports cover the full range, manually updating the c_expr
425 src_range.
426
be3c9981 4272016-01-06 Marek Polacek <polacek@redhat.com>
428
429 PR sanitizer/69099
430 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
431 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
432 NULL.
433
f1717362 4342016-01-04 Jakub Jelinek <jakub@redhat.com>
435
436 Update copyright years.
437
d7d6a3ab 4382016-01-04 Marek Polacek <polacek@redhat.com>
439
440 PR c/68908
441 * c-typeck.c (build_atomic_assign): Improve commentary. Add
442 optimization to use __atomic_fetch_* built-in if possible.
443
9d5fd7c6 4442015-12-23 Thomas Schwinge <thomas@codesourcery.com>
445
446 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
447 into...
448 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
449 all users.
450
37e2d32f 4512015-12-22 Marek Polacek <polacek@redhat.com>
452
453 PR c/69002
454 * c-typeck.c (build_component_ref): Warn when acessing elements of
455 atomic structures or unions.
456
c0bf500c 4572015-12-21 David Malcolm <dmalcolm@redhat.com>
458
459 * c-typeck.c: Include "gcc-rich-location.h".
460 (build_binary_op): In the two places that call binary_op_error,
461 create a gcc_rich_location and populate it with the location of
462 the binary op and its two operands.
463
b9f9586a 4642015-12-16 David Malcolm <dmalcolm@redhat.com>
465
466 * c-parser.c (c_parser_statement_after_labels): When calling
467 c_finish_return, Use the return expression's location if it has
468 one, falling back to the location of the first token within it.
469 * c-typeck.c (c_finish_return): When issuing warnings about
470 the incorrect presence/absence of a return value, issue a note
471 showing the declaration of the function.
472
dbd79382 4732015-12-16 David Malcolm <dmalcolm@redhat.com>
474
475 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
476 to 4.
477 (c_parser_peek_nth_token): New function.
478 (c_parser_peek_conflict_marker): New function.
479 (c_parser_error): Detect conflict markers and report them as such.
480
e2093e02 4812015-12-16 David Malcolm <dmalcolm@redhat.com>
482
483 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
484 to preserve range information for the primary expression
485 in the call to c_parser_postfix_expression_after_primary.
486
b49f1fbb 4872015-12-16 David Malcolm <dmalcolm@redhat.com>
488
489 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
490 expression location, falling back on the first token location,
491 rather than always using the latter.
492
1d65bac2 4932015-12-16 Marek Polacek <polacek@redhat.com>
494
495 PR c/64637
496 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
497 available.
498
75e722a6 4992015-12-15 Marek Polacek <polacek@redhat.com>
500
501 PR c/68907
502 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
503 artificial decl.
504
7063d45b 5052015-12-08 David Malcolm <dmalcolm@redhat.com>
506
507 * c-parser.c (c_parser_alignof_expression): Capture location of
508 closing parenthesis (if any), or of end of unary expression, and
509 use it to build a src_range for the expression.
510
f73b4782 5112015-12-08 David Malcolm <dmalcolm@redhat.com>
512
513 PR c/68757
514 * c-parser.c (c_parser_get_builtin_args): Add
515 "out_close_paren_loc" param, and write back to it.
516 (c_parser_postfix_expression): Capture the closing
517 parenthesis location for RID_CHOOSE_EXPR,
518 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
519 RID_BUILTIN_SHUFFLE and use it to set the source range
520 for such expressions; within RID_BUILTIN_COMPLEX set
521 the underlying location.
522
1b062945 5232015-12-07 Marek Polacek <polacek@redhat.com>
524
525 PR c/68668
526 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
527 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
528
a4ab54ac 5292015-12-04 Eric Botcazou <ebotcazou@adacore.com>
530
531 * c-tree.h (c_build_va_arg): Adjust prototype.
532 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
533 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
534 parameter, adjust throughout and issue an error if EXPR is a component
535 with reverse storage order.
536
da562e32 5372015-12-02 Jason Merrill <jason@redhat.com>
538
539 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
540 (c_fully_fold_internal, decl_constant_value_for_optimization):
541 Move from c-common.c.
542 * c-tree.h: Declare decl_constant_value_for_optimization.
543 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
544
89f16034 5452015-12-02 Joseph Myers <joseph@codesourcery.com>
546
547 PR c/68162
548 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
549 following link from declarator to next declarator. Track original
550 qualified type and pass it to c_build_qualified_type.
551 * c-typeck.c (c_build_qualified_type): Add arguments
552 orig_qual_type and orig_qual_indirect.
553
2a7545d5 5542015-12-02 Thomas Schwinge <thomas@codesourcery.com>
555
556 * c-parser.c (c_parser_omp_clause_name)
557 (c_parser_oacc_all_clauses): Alphabetical sorting.
558
ad80582d 5592015-12-02 Jakub Jelinek <jakub@redhat.com>
560
561 PR c/68533
562 * c-decl.c (get_parm_info): Use b->locus instead of input_location
563 for diagnostics.
564
571b3486 5652015-12-01 Julian Brown <julian@codesourcery.com>
566 Cesar Philippidis <cesar@codesourcery.com>
567 James Norris <James_Norris@mentor.com>
568
569 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
570 (c_parser_oacc_clause_use_device): New function.
571 (c_parser_oacc_all_clauses): Add use_device support.
572 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
573 (c_parser_oacc_host_data): New function.
574 (c_parser_omp_construct): Add host_data support.
575 * c-tree.h (c_finish_oacc_host_data): Add prototype.
576 * c-typeck.c (c_finish_oacc_host_data): New function.
577 (c_finish_omp_clauses): Add use_device support.
578
c4848393 5792015-11-29 Jan Hubicka <hubicka@ucw.cz>
580
581 PR c/67106
582 * c-decl.c: Set TYPE_PACKED in variants.
583
d4e328e9 5842015-11-27 Martin Liska <mliska@suse.cz>
585
586 PR c++/68312
587 * c-array-notation.c (fix_builtin_array_notation_fn):
588 Use release_vec_vec instead of vec::release.
589 (build_array_notation_expr): Likewise.
590 (fix_conditional_array_notations_1): Likewise.
591 (fix_array_notation_expr): Likewise.
592 (fix_array_notation_call_expr): Likewise.
593
c5e4f591 5942015-11-27 Jakub Jelinek <jakub@redhat.com>
595
596 PR c/63326
597 * c-parser.c (c_parser_compound_statement_nostart): If
598 last_label is true, use pragma_stmt instead of pragma_compound
599 as second c_parser_pragma argument.
600 (c_parser_omp_ordered, c_parser_omp_target_update,
601 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
602 false as second argument to c_parser_skip_to_pragma_eol after
603 diagnosing standalone directives used in pragma_stmt context.
604
c954a5bd 6052015-11-24 Ilya Verbin <ilya.verbin@intel.com>
606
607 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
608 with "if (ENABLE_OFFLOADING)".
609
daebf4f3 6102015-11-23 David Malcolm <dmalcolm@redhat.com>
611
612 PR objc/68438
613 * c-parser.c (c_parser_postfix_expression): Set up source ranges
614 for various Objective-C constructs: Class.name syntax,
615 @selector(), @protocol(), @encode(), and [] message syntax.
616
734caf84 6172015-11-20 David Malcolm <dmalcolm@redhat.com>
618
619 PR 62314
620 * c-typeck.c (should_suggest_deref_p): New function.
621 (build_component_ref): Special-case POINTER_TYPE when
622 generating a "not a structure of union" error message, and
623 suggest a "->" rather than a ".", providing a fix-it hint.
624
11d8dd6f 6252015-11-19 David Malcolm <dmalcolm@redhat.com>
626
627 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
628 candidate into a new function, find_closest_identifier.
629
62efaf6b 6302015-11-19 Marek Polacek <polacek@redhat.com>
631
632 PR c/68412
633 * c-typeck.c (parser_build_binary_op): Properly handle
634 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
635
9dfffd6d 6362015-11-17 David Malcolm <dmalcolm@redhat.com>
637
638 * c-parser.c (set_c_expr_source_range): Bulletproof both
639 overloaded implementations against NULL expr->value.
640 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
641 values.
642 (c_parser_unary_expression): Likewise when handling addresses of
643 labels.
644 (c_parser_postfix_expression): Likewise for statement expressions,
645 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
646 __builtin_va_arg, and for __builtin_offset_of.
647 (c_parser_postfix_expression_after_paren_type): Initialize expr's
648 src_range using the range of the braced initializer.
649 (c_parser_transaction_expression): Set src_range for "ret" to a
650 sane pair of values.
651
c58a4cfd 6522015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
653
654 * c-parser.c (c_finish_omp_declare_simd): Look for
655 "simd" attribute as well. Update error message.
656
5f3001a9 6572015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
658
659 * c-parser.c (c_parser_omp_declare_target): Adjust.
660
a9833286 6612015-11-14 Jakub Jelinek <jakub@redhat.com>
662
663 * c-typeck.c (c_finish_omp_clauses): Don't mark
664 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
665
ef61516b 6662015-11-14 Marek Polacek <polacek@redhat.com>
667
668 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
669 * c-typeck.c: Likewise.
670
a96cefb2 6712015-11-13 David Malcolm <dmalcolm@redhat.com>
672
673 * c-decl.c (warn_defaults_to): Pass line_table to
674 rich_location ctor.
675 * c-errors.c (pedwarn_c99): Likewise.
676 (pedwarn_c90): Likewise.
677 * c-parser.c (set_c_expr_source_range): New functions.
678 (c_token::get_range): New method.
679 (c_token::get_finish): New method.
680 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
681 based on the range from the start of the LHS to the end of the
682 RHS.
683 (c_parser_conditional_expression): Likewise, based on the range
684 from the start of the cond.value to the end of exp2.value.
685 (c_parser_binary_expression): Call set_c_expr_source_range on
686 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
687 (c_parser_cast_expression): Call set_c_expr_source_range on ret
688 based on the cast_loc through to the end of the expr.
689 (c_parser_unary_expression): Likewise, based on the
690 op_loc through to the end of op.
691 (c_parser_sizeof_expression) Likewise, based on the start of the
692 sizeof token through to either the closing paren or the end of
693 expr.
694 (c_parser_postfix_expression): Likewise, using the token range,
695 or from the open paren through to the close paren for
696 parenthesized expressions.
697 (c_parser_postfix_expression_after_primary): Likewise, for
698 various kinds of expression.
699 * c-tree.h (struct c_expr): Add field "src_range".
700 (c_expr::get_start): New method.
701 (c_expr::get_finish): New method.
702 (set_c_expr_source_range): New decls.
703 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
704 on ret for prefix unary ops.
705 (parser_build_binary_op): Likewise, running from the start of
706 arg1.value through to the end of arg2.value.
707
7a810b2f 7082015-11-13 Marek Polacek <polacek@redhat.com>
709
710 PR c/68320
711 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
712
b67f0560 7132015-11-13 David Malcolm <dmalcolm@redhat.com>
714
715 * c-typeck.c: Include spellcheck.h.
716 (lookup_field_fuzzy_find_candidates): New function.
717 (lookup_field_fuzzy): New function.
718 (build_component_ref): If the field was not found, try using
719 lookup_field_fuzzy and potentially offer a suggestion.
720
2fc5e987 7212015-11-12 James Norris <jnorris@codesourcery.com>
722 Joseph Myers <joseph@codesourcery.com>
723
724 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
725 (c_parser_omp_clause_name): Handle 'device_resident' clause.
726 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
727 and PRAGMA_OMP_CLAUSE_LINK.
728 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
729 and PRAGMA_OACC_CLAUSE_LINK.
730 (OACC_DECLARE_CLAUSE_MASK): New definition.
731 (c_parser_oacc_declare): New function.
732
28a70e29 7332015-11-12 Marek Polacek <polacek@redhat.com>
734
735 PR c/67784
736 * c-parser.c (c_parser_for_statement): Reclassify the token in
737 a correct scope.
738
81b1b2a8 7392015-11-11 Marek Polacek <polacek@redhat.com>
740
741 PR c/68107
742 PR c++/68266
743 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
744 checking the size of an array.
745
6e803544 7462015-11-11 Andrew MacLeod <amacleod@redhat.com>
747
748 * c-array-notation.c: Remove unused header files.
749 * c-aux-info.c: Likewise.
750 * c-convert.c: Likewise.
751 * c-decl.c: Likewise.
752 * c-errors.c: Likewise.
753 * c-lang.c: Likewise.
754 * c-objc-common.c: Likewise.
755 * c-parser.c: Likewise.
756 * c-typeck.c: Likewise.
757 * gccspec.c: Likewise.
758
a1b7fe4b 7592015-11-09 Thomas Schwinge <thomas@codesourcery.com>
760 Cesar Philippidis <cesar@codesourcery.com>
761 James Norris <jnorris@codesourcery.com>
762 Julian Brown <julian@codesourcery.com>
763 Nathan Sidwell <nathan@codesourcery.com>
764
765 c/
766 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
767 routine arg.
768 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
769 (c_parser_pragma): Parse 'acc routine'.
770 (OACC_ROUTINE_CLAUSE_MARK): Define.
771 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
772
7758d608 7732015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
774
775 PR debug/67192
776 * c-typeck.c (c_finish_loop): For unconditional loops, set the
777 location of the backward-goto to the start of the loop body.
778
c2bf2fb2 7792015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
780
781 PR debug/67192
782 * c-parser.c (c_parser_while_statement): Finish the loop before
783 parsing ahead for misleading indentation.
784 (c_parser_for_statement): Likewise.
785
292237f3 7862015-11-08 Eric Botcazou <ebotcazou@adacore.com>
787
788 * c-decl.c (finish_struct): If the structure has reverse storage
789 order, rewrite the type of array fields with scalar component. Call
790 maybe_apply_pragma_scalar_storage_order on entry.
791 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
792 errors on bit-fields and reverse SSO here and not...
793 (c_mark_addressable): ...here.
794 (output_init_element): Adjust call to initializer_constant_valid_p.
795 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
796
f0479000 7972015-11-06 David Malcolm <dmalcolm@redhat.com>
798
799 * c-decl.c (warn_defaults_to): Update for change in signature
800 of diagnostic_set_info.
801 * c-errors.c (pedwarn_c99): Likewise.
802 (pedwarn_c90): Likewise.
803 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
804 for textinfo::set_location.
805
ef014f95 8062015-11-05 Cesar Philippidis <cesar@codesourcery.com>
807 Thomas Schwinge <thomas@codesourcery.com>
808 James Norris <jnorris@codesourcery.com>
809
810 * c-parser.c (c_parser_omp_clause_name): Add support for
811 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
812 (c_parser_omp_clause_default): Add is_oacc argument. Handle
813 default(none) in OpenACC.
814 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
815 arguments.
816 (c_parser_oacc_clause_tile): New function.
817 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
818 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
819 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
820 TILE}.
821 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
822 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
823 FIRSTPRIVATE}.
824 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
825 (c_parser_oacc_update): Update the error message for missing clauses.
826 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
827 and OMP_CLAUSE_INDEPENDENT.
828
f480ca9a 8292015-11-05 Marek Polacek <polacek@redhat.com>
830
831 PR c/68090
832 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
833 deal with pre-evaluation on invalid types.
834
9561765e 8352015-11-05 Jakub Jelinek <jakub@redhat.com>
836 Ilya Verbin <ilya.verbin@intel.com>
837
838 * c-parser.c: Include context.h and gimple-expr.h.
839 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
840 monotonic together with nonmonotonic.
841 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
842 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
843 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
844 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
845 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
846 expressions on combined target teams before the target.
847 (c_parser_omp_declare_target): If decl has "omp declare target" or
848 "omp declare target link" attribute, and cgraph or varpool node already
849 exists, then set corresponding flags. Call c_finish_omp_clauses
850 in the parenthesized extended-list syntax case.
851 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
852 declare target.
853 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
854 on OMP_CLAUSE_REDUCTION array sections.
855 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
856 into the constant offset, or for variable low-bound using
857 POINTER_PLUS_EXPR. For structure element based array sections use
858 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
859 (c_finish_omp_clauses): Drop generic_field_head, structure
860 elements are now always mapped even as array section bases,
861 diagnose same var in data sharing and mapping clauses. Diagnose if
862 linear step on declare simd is neither a constant nor a uniform
863 parameter. Look through POINTER_PLUS_EXPR for array section
864 reductions. Diagnose the same var or function appearing multiple
865 times on the same directive. Fix up wording for the to clause if t
866 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
867 modifier on kinds other than dynamic or guided or nonmonotonic
868 modifier together with ordered clause.
869
9e10bfb7 8702015-11-03 Thomas Schwinge <thomas@codesourcery.com>
871 Chung-Lin Tang <cltang@codesourcery.com>
872
873 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
874
4cba6f60 8752015-10-29 Andrew MacLeod <amacleod@redhat.com>
876
877 * c-array-notation.c: Reorder #include's and remove duplicates.
878 * c-aux-info.c: Likewise.
879 * c-convert.c: Likewise.
880 * c-decl.c: Likewise.
881 * c-errors.c: Likewise.
882 * c-lang.c: Likewise.
883 * c-objc-common.c: Likewise.
884 * c-parser.c: Likewise.
885 * c-typeck.c: Likewise.
886
7b15d957 8872015-10-26 Jim Wilson <jim.wilson@linaro.org>
888
889 PR debug/66068
890 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
891 after calling build_qualified_type.
892
62c48328 8932015-10-27 Cesar Philippidis <cesar@codesourcery.com>
894 Thomas Schwinge <thomas@codesourcery.com>
895 James Norris <jnorris@codesourcery.com>
896 Joseph Myers <joseph@codesourcery.com>
897 Julian Brown <julian@codesourcery.com>
898 Bernd Schmidt <bschmidt@redhat.com>
899
900 * c-parser.c (c_parser_oacc_shape_clause): New.
901 (c_parser_oacc_simple_clause): New.
902 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
903 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
904
2c4c8725 9052015-10-27 Thomas Schwinge <thomas@codesourcery.com>
906 James Norris <jnorris@codesourcery.com>
907 Cesar Philippidis <cesar@codesourcery.com>
908
909 PR c/64765
910 PR c/64880
911 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
912 parameters, and handle these. Adjust all users.
913 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
914 into...
915 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
916 all users.
917 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
918 declare functions.
919 (c_finish_omp_construct): Declare function.
920 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
921 Merge functions into...
922 (c_finish_omp_construct): ... this new function.
923
844cece0 9242015-10-22 Richard Biener <rguenther@suse.de>
925
926 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
927 before folding a MINUS_EXPR.
928
5ce1b137 9292015-10-21 Marek Polacek <polacek@redhat.com>
930
931 PR c/68024
932 * c-decl.c (start_function): Warn about vararg functions without
933 a prototype.
934
1f137e6d 9352015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
936
937 * c-typeck.c (build_conditional_expr): Use boolean vector
938 type for vector comparison.
939 (build_vec_cmp): New.
940 (build_binary_op): Use build_vec_cmp for comparison.
941
8523243e 9422015-10-20 Marek Polacek <polacek@redhat.com>
943
944 * c-parser.c (is_cilkplus_vector_p): Don't define here.
945
3f73be3e 9462015-10-20 Marek Polacek <polacek@redhat.com>
947
948 PR c/67964
949 * c-parser.c (c_parser_attributes): Break out of the loop if the
950 token after an attribute isn't a comma.
951
43895be5 9522015-10-13 Jakub Jelinek <jakub@redhat.com>
953 Aldy Hernandez <aldyh@redhat.com>
954
955 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
956 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
957 (c_parser_omp_variable_list): Handle structure elements for
958 map, to and from clauses. Handle array sections in reduction
959 clause. Formatting fixes.
960 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
961 if clause modifiers.
962 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
963 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
964 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
965 c_parser_omp_clause_is_device_ptr): New functions.
966 (c_parser_omp_clause_ordered): Parse optional parameter.
967 (c_parser_omp_clause_reduction): Handle array reductions.
968 (c_parser_omp_clause_schedule): Parse optional simd modifier.
969 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
970 functions.
971 (c_parser_omp_clause_linear): Parse linear clause modifiers.
972 (c_parser_omp_clause_depend_sink): New function.
973 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
974 (c_parser_omp_clause_map): Parse release/delete map kinds and
975 optional always modifier.
976 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
977 and c_finish_omp_clauses callers.
978 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
979 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
980 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
981 (OMP_CRITICAL_CLAUSE_MASK): Define.
982 (c_parser_omp_critical): Parse critical clauses.
983 (c_parser_omp_for_loop): Handle doacross loops, adjust
984 c_finish_omp_for and c_finish_omp_clauses callers.
985 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
986 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
987 (OMP_FOR_CLAUSE_MASK): Add linear clause.
988 (c_parser_omp_for): Disallow ordered clause when combined with
989 distribute. Disallow linear clause when combined with distribute
990 and not combined with simd.
991 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
992 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
993 parse clauses and if depend clause is found, don't parse a body.
994 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
995 Allow target parallel without for after it.
996 (OMP_TASK_CLAUSE_MASK): Add priority clause.
997 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
998 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
999 invalid kinds.
1000 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1001 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1002 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1003 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1004 functions.
1005 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1006 defaultmap and is_device_ptr clauses.
1007 (c_parser_omp_target): Parse target parallel and target simd. Set
1008 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1009 and target exit data. Diagnose invalid map kinds.
1010 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1011 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1012 construct.
1013 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1014 &omp_priv.
1015 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1016 (c_parser_omp_taskloop): New function.
1017 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1018 handle PRAGMA_OMP_TASKLOOP.
1019 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1020 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1021 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1022 Add IS_OMP argument, handle structure element bases, diagnose
1023 bitfields, pass IS_OMP recursively, diagnose known zero length
1024 array sections in depend clauses, handle array sections in reduction
1025 clause, diagnose negative length even for pointers.
1026 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1027 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1028 array sections in reduction clause, set
1029 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1030 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1031 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1032 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1033
789fbb51 10342015-10-06 Marek Polacek <polacek@redhat.com>
1035
1036 * c-parser.c (c_parser_statement_after_labels): Use
1037 protected_set_expr_location.
1038 (c_parser_omp_clause_num_gangs): Likewise.
1039 (c_parser_omp_clause_num_threads): Likewise.
1040 (c_parser_omp_clause_num_workers): Likewise.
1041 (c_parser_omp_clause_vector_length): Likewise.
1042 (c_parser_omp_clause_num_teams): Likewise.
1043 (c_parser_omp_clause_thread_limit): Likewise.
1044 * c-typeck.c (build_c_cast): Likewise.
1045 (c_cast_expr): Likewise.
1046
20cb53c9 10472015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1048
1049 * c-typeck.c (c_tree_equal): Use real_equal instead of
1050 REAL_VALUES_EQUAL.
1051
6d02e6b2 10522015-10-04 Jason Merrill <jason@redhat.com>
1053
1054 * c-parser.c (c_lex_one_token): Handle @synchronized.
1055 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1056 can change whether the function is transaction_safe.
1057
802c32cd 10582015-10-02 Marek Polacek <polacek@redhat.com>
1059
1060 PR c/67730
1061 * c-typeck.c (convert_for_assignment): Use the expansion point
1062 location throughout.
1063
ef17a71a 10642015-10-02 Marek Polacek <polacek@redhat.com>
1065
1066 PR c/64249
1067 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1068 and pass it down to c_parser_if_statement.
1069 (c_parser_else_body): Add CHAIN parameter and pass it down to
1070 c_parser_statement_after_labels.
1071 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1072 duplicated if-else-if conditions.
1073
7e93eb1a 10742015-10-01 Marek Polacek <polacek@redhat.com>
1075
1076 * c-typeck.c (convert_for_assignment): Improve commentary.
1077
ab4c803c 10782015-09-30 Marek Polacek <polacek@redhat.com>
1079
1080 PR c/67730
1081 * c-typeck.c (c_finish_return): Use the expansion point location for
1082 certain "return with value" warnings.
1083
ed536208 10842015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1085
1086 * c-parser.c (pragma_lex): Add loc argument.
1087
03e8b174 10882015-09-15 Marek Polacek <polacek@redhat.com>
1089
1090 PR c/67580
1091 * c-decl.c (tag_exists_p): New function.
1092 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1093 struct/union/enum keywords are missing.
1094 * c-tree.h (tag_exists_p): Declare.
1095
a39b4dc0 10962015-09-15 Marek Polacek <polacek@redhat.com>
1097
1098 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1099 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1100 Return NULL_TREE instead of 0.
1101 (lookup_name): Return NULL_TREE instead of 0.
1102 (lookup_name_in_scope): Likewise.
1103 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1104 (parser_xref_tag): Use false instead of 0.
1105 (start_struct): Use true instead of 1.
1106 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1107
85f5e2ee 11082015-09-14 Marek Polacek <polacek@redhat.com>
1109
1110 * c-typeck.c (set_nonincremental_init_from_string): Use
1111 HOST_WIDE_INT_M1U when shifting a negative value.
1112
739237d5 11132015-09-09 Mark Wielaard <mjw@redhat.com>
1114
1115 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1116 parm against NULL.
1117
d2b2788c 11182015-09-10 Jakub Jelinek <jakub@redhat.com>
1119
1120 PR c/67502
1121 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1122 into OMP_FOR_PRE_BODY rather than before the loop.
1123
deef87db 11242015-09-09 Jakub Jelinek <jakub@redhat.com>
1125
c43f93d7 1126 PR c/67501
1127 * c-parser.c (c_parser_oacc_all_clauses,
1128 c_parser_omp_all_clauses): Remove invalid clause from
1129 list of clauses even if parser->error is set.
1130
0fdcfb93 1131 PR c/67500
1132 * c-parser.c (c_parser_omp_clause_aligned,
1133 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1134 test for errors.
1135 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1136 error_mark_node.
1137
deef87db 1138 PR c/67495
1139 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1140 instead of c_parser_unary_expression. If the result is !lvalue_p,
1141 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1142
e96292e9 11432015-09-04 Marek Polacek <polacek@redhat.com>
1144
1145 PR sanitizer/67279
1146 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1147
547c6b1f 11482015-09-03 Martin Sebor <msebor@redhat.com>
1149
1150 PR c/66516
6ccd7236 1151 * c-typeck.c (convert_arguments, parser_build_unary_op,
1152 build_conditional_expr, c_cast_expr, convert_for_assignment,
1153 build_binary_op, _objc_common_truthvalue_conversion): Call
547c6b1f 1154 reject_gcc_builtin.
1155 (c_decl_implicit): Define.
1156
bd66724c 11572015-09-02 Marek Polacek <polacek@redhat.com>
1158
1159 PR c/67432
1160 * c-parser.c (c_parser_enum_specifier): Give a better error for
1161 an empty enum.
1162
6dc50383 11632015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1164
1165 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1166
7ad1d78d 11672015-08-12 Marek Polacek <polacek@redhat.com>
1168
1169 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1170 LOC to it.
1171
c9099388 11722015-08-03 Marek Polacek <polacek@redhat.com>
1173
1174 PR c/67088
1175 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1176 Use it.
1177 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1178
9255be07 11792015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1180
1181 * c-parser.c (c_parser_if_body): Take token_indent_info
1182 argument. Call warn_for_misleading_indentation even when the
1183 body is a semicolon. Extract token_indent_infos corresponding
1184 to the guard, body and next tokens. Adjust call to
1185 warn_for_misleading_indentation accordingly.
1186 (c_parser_else_body): Likewise.
1187 (c_parser_if_statement): Likewise.
1188 (c_parser_while_statement): Likewise.
1189 (c_parser_for_statement): Likewise.
1190
dbbd4c6d 11912015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1192 Manuel López-Ibáñez <manu@gcc.gnu.org>
1193
1194 * c-decl.c (get_parm_info): Remove static var. Update warning
1195 message.
1196
6784a472 11972015-07-27 Marek Polacek <polacek@redhat.com>
1198
1199 PR c++/66555
1200 PR c/54979
1201 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1202
8d669e79 12032015-07-20 Marek Polacek <polacek@redhat.com>
1204
1205 PR c++/55095
1206 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1207 (build_binary_op): Warn about left shift overflows.
1208
1eacc14a 12092015-07-09 Andrew MacLeod <amacleod@redhat.com>
1210
1211 * c-array-notation.c: Adjust includes for flags.h changes.
1212 * c-objc-common.c: Likewise.
1213
9ef16211 12142015-07-07 Andrew MacLeod <amacleod@redhat.com>
1215
1216 * c-array-notation.c: Adjust includes.
1217 * c-aux-info.c: Likewise.
1218 * c-convert.c: Likewise.
1219 * c-decl.c: Likewise.
1220 * c-errors.c: Likewise.
1221 * c-lang.c: Likewise.
1222 * c-objc-common.c: Likewise.
1223 * c-parser.c: Likewise.
1224 * c-typeck.c: Likewise.
1225
0949f227 12262015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1227
1228 PR fortran/66605
1229 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1230
be23b16f 12312015-06-29 Marek Polacek <polacek@redhat.com>
1232
1233 PR c/66322
1234 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1235 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1236 about -Wswitch-bool here.
1237 (do_case): Update c_add_case_label call.
1238 (c_finish_case): Update c_do_switch_warnings call.
1239
6290f0db 12402015-06-27 Marek Polacek <polacek@redhat.com>
1241
1242 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1243
aa3e402e 12442015-06-26 Marek Polacek <polacek@redhat.com>
1245
1246 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1247 INDIRECT_REF_P.
1248 * c-typeck.c (array_to_pointer_conversion): Likewise.
1249 (build_unary_op): Likewise.
1250 (c_finish_return): Likewise.
1251
ec2e0095 12522015-06-25 Andrew MacLeod <amacleod@redhat.com>
1253
1254 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1255 * c-parser.c: Likewise.
1256
770ff93b 12572015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1258
1259 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1260 instead of pointer_hash.
1261 (detect_field_duplicates): Likewise.
1262
f48c7f4a 12632015-06-25 Marek Polacek <polacek@redhat.com>
1264
1265 * c-array-notation.c: Use VAR_P throughout.
1266 * c-decl.c: Likewise.
1267 * c-objc-common.c: Likewise.
1268 * c-parser.c: Likewise.
1269 * c-typeck.c: Likewise.
1270
ce41e81a 12712015-06-25 Marek Polacek <polacek@redhat.com>
1272
1273 * c-decl.c: Use is_global_var throughout.
1274 * c-parser.c: Likewise.
1275 * c-typeck.c: Likewise.
1276
f2ab3bac 12772015-06-17 Andrew MacLeod <amacleod@redhat.com>
1278
1279 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1280 * c-aux-info.c: Likewise.
1281 * c-convert.c: Likewise.
1282 * c-decl.c: Likewise.
1283 * c-errors.c: Likewise.
1284 * c-lang.c: Likewise.
1285 * c-objc-common.c: Likewise.
1286 * c-parser.c: Likewise.
1287 * c-typeck.c: Likewise.
1288
647730ab 12892015-06-11 Jan Hubicka <hubicka@ucw.cz>
1290
1291 PR middle-end/66325
1292 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1293 variants.
1294
dd4b0a0d 12952015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1296
1297 * c-decl.c (pop_scope): Register the main translation unit
1298 through the new debug hook.
1299
64486212 13002015-06-08 Andrew MacLeod <amacleod@redhat.com>
1301
1302 * c-array-notation.c : Adjust include files.
1303 * c-aux-info.c : Likewise.
1304 * c-convert.c : Likewise.
1305 * c-decl.c : Likewise.
1306 * c-errors.c : Likewise.
1307 * c-lang.c : Likewise.
1308 * c-lang.h : Likewise.
1309 * c-objc-common.c : Likewise.
1310 * c-parser.c : Likewise.
1311 * c-typeck.c : Likewise.
1312
3a1c9df2 13132015-06-05 Aldy Hernandez <aldyh@redhat.com>
1314
1315 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1316 immediately clobber it.
1317 (c_write_global_declarations_1): Remove call to
1318 check_global_declaration_1.
1319 (c_write_global_declarations_2): Remove.
1320 (c_write_final_cleanups): Rename from c_write_global_declarations.
1321 Remove call to finalize_compilation_unit.
1322 Remove calls to debugging hooks.
1323 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1324 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1325 * c-tree.h: Remove c_write_global_declarations.
1326
f77c0292 13272015-06-04 Andrew MacLeod <amacleod@redhat.com>
1328
1329 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1330 * c-aux-info.c: Likewise.
1331 * c-convert.c: Likewise.
1332 * c-decl.c: Likewise.
1333 * c-errors.c: Likewise.
1334 * c-lang.c: Likewise.
1335 * c-objc-common.c: Likewise.
1336 * c-parser.c: Likewise.
1337 * c-typeck.c: Likewise.
1338
b44134dc 13392015-06-04 Marek Polacek <polacek@redhat.com>
1340
1341 PR c/66341
1342 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1343 it is a lvalue.
1344
d1df0bfc 13452015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1346
1347 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1348 Warn for empty struct.
1349 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1350
f8363c5d 13512015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1352
1353 * c-decl.c (start_function): Call plugin before parsing.
1354 (finish_function): Call plugin after parsing.
1355
5b9761f5 13562015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1357
1358 PR c/49551
1359 * c-decl.c (merge_decls): Merge DECL_COMMON.
1360
eeec71b4 13612015-05-22 Jim Wilson <jim.wilson@linaro.org>
1362
1363 * Make-lang.in (check_gcc_pallelize): Define.
1364
5a4c69dd 13652015-05-22 Marek Polacek <polacek@redhat.com>
1366
1367 PR c/47043
1368 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1369 attributes.
1370
5650b4ff 13712015-05-21 Marek Polacek <polacek@redhat.com>
1372
1373 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1374 DECL_BUILT_IN.
1375
b443c459 13762015-05-20 Marek Polacek <polacek@redhat.com>
1377
1378 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1379 * c-typeck.c: Likewise.
1380
9e73638f 13812015-05-19 Marek Polacek <polacek@redhat.com>
1382
1383 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1384
d7729e26 13852015-05-19 Jakub Jelinek <jakub@redhat.com>
1386
1387 PR middle-end/66199
1388 * c-parser.c (c_parser_omp_for_loop): Don't add
1389 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1390 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1391 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1392 constructs.
1393
dfcf26a5 13942015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1395
1396 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
9e73638f 1397 swaps.
dfcf26a5 1398
09172322 13992015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1400
1401 PR fortran/44054
1402 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1403 accessor function.
1404
aac24642 14052015-05-14 Marek Polacek <polacek@redhat.com>
1406
1407 PR c/66066
1408 PR c/66127
1409 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1410 rather than with 0.
1411
e5f01cba 14122015-05-12 David Malcolm <dmalcolm@redhat.com>
1413
1414 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1415 to add a call to warn_for_misleading_indentation.
1416 (c_parser_else_body): Likewise, adding param "else_loc".
1417 (c_parser_if_statement): Check for misleading indentation.
1418 (c_parser_while_statement): Likewise.
1419 (c_parser_for_statement): Likewise.
1420
dc5945dc 14212015-05-08 Marek Polacek <polacek@redhat.com>
1422
1423 PR c/64918
1424 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1425 (output_init_element): Likewise.
1426
cdc64059 14272015-05-07 Marek Polacek <polacek@redhat.com>
1428
1429 PR c/65179
1430 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1431 value.
1432
6fa7118e 14332015-04-30 Marek Polacek <polacek@redhat.com>
1434
1435 * c-typeck.c (set_init_label): Call error_at instead of error and
1436 pass LOC to it.
1437
98f44804 1438 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1439 the type of a decl.
1440
2cd7caae 1441 * c-typeck.c (c_build_va_arg): Clarify the error message.
1442
95cfd391 14432015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1444
1445 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1446 OMP_STANDALONE_CLAUSES.
1447
e65e39f8 14482015-04-28 Marek Polacek <polacek@redhat.com>
1449
1450 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1451
5580bf42 14522015-04-28 Marek Polacek <polacek@redhat.com>
1453
1454 PR c/65901
1455 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1456
c3468fc2 14572015-04-25 Marek Polacek <polacek@redhat.com>
1458
1459 PR c/52085
1460 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1461 attribute.
1462
0cd6b1b4 14632015-04-23 Marek Polacek <polacek@redhat.com>
1464
1465 PR c/65345
1466 * c-decl.c (set_labels_context_r): New function.
1467 (store_parm_decls): Call it via walk_tree_without_duplicates.
1468 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1469 instead of create_tmp_var. Build TARGET_EXPR instead of
1470 COMPOUND_EXPR.
1471 (build_atomic_assign): Use create_tmp_var_raw instead of
1472 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1473
05a827ce 14742015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1475
1476 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1477 (c_parser_omp_target_update): Add missed %> to error_at ().
1478
de801c28 14792015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1480
1481 PR target/55143
1482 * c-decl.c (c_default_pointer_mode): Remove definition.
1483 * c-tree.h (c_default_pointer_mode): Remove declaration.
1484
c3b1dca4 14852015-03-27 Tobias Burnus <burnus@net-b.de>
1486
1487 PR c/65586
1488 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1489 error out.
1490 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1491 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1492 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1493
1443772f 14942015-03-19 Jakub Jelinek <jakub@redhat.com>
1495
1496 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1497 attribute for DECL_EXTERNAL VAR_DECLs.
1498
76738f56 14992015-03-11 Jakub Jelinek <jakub@redhat.com>
1500
1501 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1502 argument.
1503
16f958b3 15042015-03-10 Jakub Jelinek <jakub@redhat.com>
1505
1506 PR c/65120
1507 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1508 before preparing arguments to warn_logical_not_parentheses.
1509
6054103a 15102015-03-09 Jakub Jelinek <jakub@redhat.com>
1511
1512 PR c/65120
1513 * c-typeck.c (parser_build_binary_op): Don't warn for
1514 !!x == y or !b == y where b is _Bool.
1515
de3a1e03 15162015-03-09 Marek Polacek <polacek@redhat.com>
1517
1518 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1519 * c-decl.c (grokdeclarator): Likewise.
1520 * c-typeck.c (build_binary_op): Likewise.
1521
084e6bf0 15222015-02-27 Marek Polacek <polacek@redhat.com>
1523
1524 PR c/65228
1525 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1526
4d7c4134 15272015-02-14 Marek Polacek <polacek@redhat.com>
1528
1529 PR c/64768
1530 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1531 declared through a typedef name.
1532
b1380826 15332015-02-13 Marek Polacek <polacek@redhat.com>
1534
1535 PR c/65050
1536 * c-decl.c (grokdeclarator): Print also the type when giving
1537 the error message about array's incomplete element type.
1538
35ff54b5 15392015-02-11 Jakub Jelinek <jakub@redhat.com>
1540
1541 PR c/64824
1542 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1543 check in the POP macro.
1544
46861609 15452015-02-09 Marek Polacek <polacek@redhat.com>
1546
1547 PR c/64856
1548 * c-typeck.c (process_init_element): Don't always wrap
1549 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1550 initializing a range of elements.
1551
bbf8fbec 15522015-02-04 Jakub Jelinek <jakub@redhat.com>
1553
1554 PR c/64824
1555 PR c/64868
1556 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1557
46861609 15582015-02-02 Bruno Loff <bruno.loff@gmail.com>
1f0ce3ac 1559
1560 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1561 processing enum declaration.
1562
70279be9 15632015-01-29 Marek Polacek <polacek@redhat.com>
1564
1565 PR c/64709
1566 * c-typeck.c (pop_init_level): If constructor_elements has
1567 exactly one element with integer_zerop value, set constructor_zeroinit
1568 to 1. Remove braces around warning_init call.
1569
591970b4 15702015-01-27 Jakub Jelinek <jakub@redhat.com>
1571
1572 PR c/64766
1573 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1574 of FUNCTION_DECLs with error_mark_node.
1575
87778dc4 15762015-01-26 Jakub Jelinek <jakub@redhat.com>
1577
1578 PR c/64778
1579 * c-typeck.c (convert_arguments): Return -1 if there are
1580 error_args, even if we've diagnosed too many arguments.
1581
cffdfb3d 15822015-01-21 Richard Biener <rguenther@suse.de>
1583
1584 PR middle-end/64313
1585 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1586 for builtins the user declared correctly.
1587
ca4c3545 15882015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1589 Bernd Schmidt <bernds@codesourcery.com>
1590 Cesar Philippidis <cesar@codesourcery.com>
1591 James Norris <jnorris@codesourcery.com>
1592 Jakub Jelinek <jakub@redhat.com>
1593 Ilmir Usmanov <i.usmanov@samsung.com>
1594
1595 * c-parser.c: Include "gomp-constants.h".
1596 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1597 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1598 Use OMP_CLAUSE_SET_MAP_KIND.
1599 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1600 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1601 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1602 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1603 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1604 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1605 "copyout", "create", "delete", "deviceptr", "gang", "host",
1606 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1607 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1608 "present_or_create", "pcreate", "seq", "self", "vector",
1609 "vector_length", "wait", "worker".
1610 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1611 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1612 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1613 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1614 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1615 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1616 (c_parser_oacc_data_clause_deviceptr)
1617 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1618 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1619 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1620 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1621 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1622 (c_parser_oacc_parallel, c_parser_oacc_update)
1623 (c_parser_oacc_wait): New functions.
1624 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1625 (c_finish_oacc_data): New prototypes.
1626 * c-typeck.c: Include "gomp-constants.h".
1627 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1628 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1629 OMP_CLAUSE_SET_MAP_KIND.
1630 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1631 (c_finish_oacc_data): New functions.
1632 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1633 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1634 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1635 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1636 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1637 GOMP_MAP_FORCE_DEVICEPTR.
1638
1f78217c 16392015-01-09 Michael Collison <michael.collison@linaro.org>
1640
1641 * c-array-notation.c: Include hash-set.h, machmode.h,
1642 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1643 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1644 * c-aux-info.c: Ditto.
1645 * c-convert.c: Ditto.
1646 * c-decl.c: Ditto.
1647 * c-errors.c: Ditto.
1648 * c-lang.c: Dittoxs.
1649 * c-objc-common.c: Ditto.
1650 * c-parser.c: Ditto.
1651 * c-typeck.c: Include hash-set.h, machmode.h,
1652 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1653 fold-const.h, wide-int.h, inchash.h, real.h and
1654 fixed-value.h due to flattening of tree.h.
1655
15e18a8c 16562015-01-07 Marek Polacek <polacek@redhat.com>
1657
1658 PR c/64417
1659 * c-typeck.c (process_init_element): Disallow initialization of
1660 a flexible array member with a string constant if the structure
1661 is in an array.
1662
d353bf18 16632015-01-05 Jakub Jelinek <jakub@redhat.com>
1664
823a9dd4 1665 PR sanitizer/64344
1666 * c-typeck.c (convert_for_assignment, c_finish_return): For
1667 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1668 types also set in_late_binary_op around convert call.
1669 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1670 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1671 result on expr as last argument to ubsan_instrument_float_cast,
1672 if in_late_binary_op, don't use c_save_expr but save_expr.
1673
d353bf18 1674 Update copyright years.
1675
92b63884 16762015-01-05 Marek Polacek <polacek@redhat.com>
1677
1678 PR c/64423
1679 * c-typeck.c (build_array_ref): Pass loc down to
1680 warn_array_subscript_with_type_char.
1681
8a8211df 16822014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1683
1684 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1685 (common-pointer-type): For pointers to arrays take qualifiers from
1686 element type.
1687 (build_conditional_expr): Add warnings for lost qualifiers.
1688 (comp-target-types): Allow pointers to arrays with different qualifiers.
1689 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1690 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1691 to PEDWARN_FOR_QUALIFIERS.
1692
35ea0139 16932014-12-17 Jakub Jelinek <jakub@redhat.com>
1694
1695 PR sanitizer/64289
1696 * c-convert.c: Include ubsan.h.
1697 (convert): For real -> integral casts and
1698 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1699 instead instrument the float cast directly.
1700
f9e245b2 17012014-11-29 Jakub Jelinek <jakub@redhat.com>
1702
1703 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1704 c_finish_stmt_expr): Remove NULL last argument from
1705 create_tmp_var_raw and create_tmp_var calls.
1706 * c-array-notation.c (fix_builtin_array_notation_fn,
1707 build_array_notation_expr, fix_conditional_array_notations_1,
1708 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1709
fce2dbd1 17102014-11-28 Marek Polacek <polacek@redhat.com>
1711
1712 PR c/63862
1713 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1714 convert the right operand to integer type.
1715
396c36b7 17162014-11-25 Marek Polacek <polacek@redhat.com>
1717
1718 PR c/63877
1719 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1720 for inline functions.
1721
c61ef207 17222014-11-21 Jakub Jelinek <jakub@redhat.com>
1723
1724 PR target/63764
1725 * c-typeck.c (build_array_ref): Adjust
1726 convert_vector_to_pointer_for_subscript caller. If it returns true,
1727 call non_lvalue_loc on the result.
1728
565353e8 17292014-11-11 Richard Biener <rguenther@suse.de>
1730
1731 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1732 to true.
1733
fdd735a7 17342014-11-10 Andi Kleen <ak@linux.intel.com>
1735
1736 PR c/60804
1737 * c-parser.c (c_parser_statement_after_labels): Call
1738 check_no_cilk.
1739 (c_parser_if_statement): Dito.
1740 (c_parser_switch_statement): Dito.
1741 (c_parser_while_statement): Dito.
1742 (c_parser_do_statement): Dito.
1743 (c_parser_for_statement): Dito.
1744 * c-typeck.c (c_finish_loop): Dito.
1745
0feb4de1 17462014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1747
1748 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1749 OPT_Wshift_count_overflow in the warnings.
1750
a3fec48a 17512014-10-30 Marek Polacek <polacek@redhat.com>
1752
1753 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1754 print the stripped version as well, if they're not the same.
1755
3754d046 17562014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1757
1758 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1759 machine_mode.
1760
1140c305 17612014-10-28 Andrew MacLeod <amacleod@redhat.com>
1762
1763 * c-decl.c: Adjust include files.
1764 * c-parser.c: Ditto.
1765
ab103e33 17662014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1767 Tom Tromey <tromey@redhat.com>
1768
1769 * c-tree.h (enum c_oracle_request): New.
1770 (c_binding_oracle_function): New typedef.
1771 (c_binding_oracle, c_pushtag, c_bind): Declare.
1772 * c-decl.c (c_binding_oracle): New global.
1773 (I_SYMBOL_CHECKED): New macro.
1774 (i_symbol_binding): New function.
1775 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1776 (I_TAG_CHECKED): New macro.
1777 (i_tag_binding): New function.
1778 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1779 (I_LABEL_CHECKED): New macro.
1780 (i_label_binding): New function.
1781 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1782 (c_print_identifier): Save and restore c_binding_oracle.
1783 (c_pushtag, c_bind): New functions.
1784
94ea8568 17852014-10-27 Andrew MacLeod <amacleod@redhat.com>
1786
1787 * c-typeck.c: Adjust include files.
1788
32ecf960 17892014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1790
1791 PR c++/53061
1792 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1793 initialization here...
1794 (c_initialize_diagnostics): ... but here. Set defaults after
1795 building pretty-printer.
1796
2981340f 17972014-10-23 Marek Polacek <polacek@redhat.com>
1798
1799 PR c/63626
1800 * c-decl.c (pop_scope): Don't print warning in external_scope.
1801
d303aeaf 18022014-10-19 Marek Polacek <polacek@redhat.com>
1803
1804 PR c/63567
1805 * c-typeck.c (output_init_element): Allow initializing objects with
1806 static storage duration with compound literals even in C99 and add
1807 pedwarn for it.
1808
bccf97da 18092014-10-17 Marek Polacek <polacek@redhat.com>
1810
1811 PR c/63567
1812 * c-typeck.c (digest_init): Allow initializing objects with static
1813 storage duration with compound literals even in C99 and add pedwarn
1814 for it.
1815
d9c77450 18162014-10-17 Marek Polacek <polacek@redhat.com>
1817
1818 PR c/63543
1819 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1820 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1821 error multiple times. Print the type.
1822
a2bbd0a7 18232014-10-17 Marek Polacek <polacek@redhat.com>
1824
1825 PR c/63549
1826 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1827 type.
1828
e610d2b2 18292014-10-17 Marek Polacek <polacek@redhat.com>
1830
1831 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1832 (start_function): Use OPT_Wimplicit_int instead of 0.
1833 (store_parm_decls_oldstyle): Likewise.
1834
6b6e56b6 18352014-10-17 Alan Modra <amodra@gmail.com>
1836
1837 PR middle-end/61848
1838 * c-decl.c (merge_decls): Don't merge section name or tls model
1839 to newdecl symtab node, instead merge to olddecl. Override
1840 existing olddecl section name. Set tls_model for all thread-local
1841 vars, not just OMP thread-private ones. Remove incorrect comment.
1842
a3020f2f 18432014-10-16 Andrew MacLeod <amacleod@redhat.com>
1844
1845 * c-decl.c: Adjust include files.
1846
9f75f026 18472014-10-14 DJ Delorie <dj@redhat.com>
1848
1849 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1850 (c_token_starts_typename): Check all __intN, not just __int128.
1851 (c_token_starts_declspecs): Likewise.
1852 (c_parser_declspecs): Likewise.
1853 (c_parser_attribute_any_word): Likewise.
1854 (c_parser_objc_selector): Likewise.
1855 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1856 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1857 is specified.
1858 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1859 __int128.
1860 (finish_declspecs): Likewise.
1861
4f284d4a 18622014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1863
1864 * c-parser.c (c_parser_all_labels): New function to replace
1865 the duplicate code.
1866 (c_parser_statement): Call the new function.
1867
61a892dc 18682014-10-09 Marek Polacek <polacek@redhat.com>
1869
1870 PR c/63480
1871 * c-typeck.c (pop_init_level): Don't warn about initializing
1872 with { }.
1873
4e888fd9 18742014-10-07 Marek Polacek <polacek@redhat.com>
1875
1876 PR c/59717
1877 * c-decl.c (header_for_builtin_fn): New function.
1878 (implicitly_declare): Suggest which header to include.
1879
224bdd51 18802014-10-07 Marek Polacek <polacek@redhat.com>
1881
1882 * c-convert.c (convert): Use error_operand_p.
1883 * c-typeck.c (require_complete_type): Likewise.
1884 (really_atomic_lvalue): Likewise.
1885 (digest_init): Likewise.
1886 (handle_omp_array_sections_1): Likewise.
1887
a2bc79db 18882014-10-03 Marek Polacek <polacek@redhat.com>
1889
1890 PR c/63453
1891 * c-decl.c (pop_scope): Don't warn about "inline function declared
1892 but never defined" for functions marked with gnu_inline attribute.
1893
4fc4088b 18942014-09-25 Jakub Jelinek <jakub@redhat.com>
1895
1896 PR c++/63249
1897 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1898 on low_bound and length.
1899
5213d6c9 19002014-09-24 Marek Polacek <polacek@redhat.com>
1901
1902 PR c/61405
1903 PR c/53874
1904 * c-parser.c: Don't define CPP_KEYWORD.
1905 (c_parser_switch_statement): Pass original type to c_finish_case.
1906 * c-tree.h (c_finish_case): Update declaration.
1907 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1908 conditionally to c_do_switch_warnings.
1909
6ea2b1bc 19102014-09-03 Marek Polacek <polacek@redhat.com>
1911
1912 PR c/62024
1913 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1914 conversions.
1915
40750995 19162014-09-02 Jakub Jelinek <jakub@redhat.com>
1917 Balaji V. Iyer <balaji.v.iyer@intel.com>
1918 Igor Zamyatin <igor.zamyatin@intel.com>
1919
1920 * c-parser.c (c_parser_cilk_for): New function.
1921 (c_parser_cilk_grainsize): Likewise.
1922 (c_get_temp_regvar): Likewise.
1923 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1924 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1925 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1926 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1927 case.
1928
8c583613 19292014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1930
1931 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1932 with using HOST_WIDE_INT without truncation to 'int'
1933
dc6229e8 19342014-08-22 Marek Polacek <polacek@redhat.com>
1935
1936 PR c++/62199
1937 * c-typeck.c (parser_build_binary_op): Adjust call to
1938 warn_logical_not_parentheses.
1939
5fdda74b 19402014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1941
1942 PR other/62008
1943 * c-parser.c (c_parser_array_notation): Check for correct
1944 type of an array added.
1945
78bf4156 19462014-08-19 Marek Polacek <polacek@redhat.com>
1947
1948 PR c++/62153
1949 * c-typeck.c (build_binary_op): If either operand of a comparison
1950 is a boolean expression, call maybe_warn_bool_compare.
1951
005b8fe7 19522014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1953
1954 PR c/45584
1955 * c-typeck.c (build_c_cast): Do a conversion even when the
1956 TYPE_MAIN_VARIANTs are the same.
1957
508ea33a 19582014-08-19 Marek Polacek <polacek@redhat.com>
1959
1960 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1961 pedwarn_c99 instead of pedwarn.
1962 (grokfield): Likewise.
1963 (warn_defaults_to): New function.
1964 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1965 Unconditionally call pedwarn_c99 instead of pedwarn.
1966 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1967 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1968 check flag_isoc11 before.
1969 * c-errors.c (pedwarn_c99): Change the return type to bool.
1970 Handle -Wc99-c11-compat.
1971 * c-parser.c (disable_extension_diagnostics): Handle
1972 warn_c99_c11_compat.
1973 (restore_extension_diagnostics): Likewise.
1974 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1975 instead of pedwarn, don't check flag_isoc11 before.
1976 (c_parser_declspecs): Likewise.
1977 (c_parser_alignas_specifier): Likewise.
1978 (c_parser_alignof_expression): Likewise.
1979 (c_parser_generic_selection): Likewise.
1980 * c-tree.h (pedwarn_c99): Update declaration.
1981 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1982 of pedwarn_c99.
1983
806fe15e 19842014-08-19 Marek Polacek <polacek@redhat.com>
1985
1986 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1987 to pedwarn_c90.
1988 * c-errors.c: Include "opts.h".
1989 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1990 * c-parser.c (disable_extension_diagnostics): Handle negative value
1991 of warn_c90_c99_compat, too.
1992 (restore_extension_diagnostics): Likewise.
1993 (c_parser_compound_statement_nostart): Pass
1994 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1995
89868e45 19962014-08-12 Marek Polacek <polacek@redhat.com>
1997
1998 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1999 Add pedwarn.
2000 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2001 Likewise.
2002 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2003
890c2e2f 20042014-08-10 Marek Polacek <polacek@redhat.com>
2005
2006 PR c/51849
2007 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2008 Call pedwarn_c90 instead of pedwarn.
2009 (check_bitfield_type_and_width): Likewise.
2010 (declspecs_add_qual): Likewise.
2011 (declspecs_add_type): Likewise.
2012 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2013 Adjust to only call pedwarn_c90.
2014 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2015 pedwarn_c90 instead of pedwarn.
2016 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2017 * c-parser.c (disable_extension_diagnostics): Handle
2018 warn_c90_c99_compat.
2019 (restore_extension_diagnostics): Likewise.
2020 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2021 pedwarn_c90 instead of pedwarn.
2022 (c_parser_initelt): Likewise.
2023 (c_parser_postfix_expression): Likewise.
2024 (c_parser_postfix_expression_after_paren_type): Likewise.
2025 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2026 * c-tree.h: Fix formatting.
2027 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2028 pedwarn_c90 instead of pedwarn.
2029
7149db5f 20302014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2031
2032 * c-typeck.c: Remove include of pointer-set.h.
2033
1c75251e 20342014-08-07 Marek Polacek <polacek@redhat.com>
2035
2036 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2037
06ecf488 20382014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2039
2040 * c-typeck.c: Use hash_map instead of pointer_map.
2041
431205b7 20422014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2043
2044 * c-decl.c: Use hash_set instead of pointer_set.
2045
3394c80c 20462014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2047
2048 PR middle-end/61455
2049 * c-array-notation.c (expand_array_notations): Handling
2050 of DECL_EXPR added.
2051
f22a2cb7 20522014-07-31 Marc Glisse <marc.glisse@inria.fr>
2053
2054 PR c++/60517
2055 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2056 a local variable.
2057
74691f46 20582014-07-30 Tom Tromey <tromey@redhat.com>
2059
2060 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2061 field.
2062 (really_start_incremental_init, push_init_level): Initialize
2063 designator_depth.
2064 (pop_init_level): Set global designator_depth.
2065 (process_init_element): Check for designated_init attribute.
2066
f9767fb6 20672014-07-20 Marek Polacek <polacek@redhat.com>
2068
2069 PR c/61852
2070 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2071 (implicitly_declare): Pass location to implicit_decl_warning.
2072
305d96bc 20732014-07-14 Jakub Jelinek <jakub@redhat.com>
2074
2075 PR middle-end/61294
2076 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2077 If non-NULL, call c_parser_check_literal_zero.
2078 (c_parser_check_literal_zero): New function.
2079 (c_parser_postfix_expression_after_primary): Adjust
2080 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2081
87d59e72 20822014-07-06 Marek Polacek <polacek@redhat.com>
2083
2084 PR c/6940
2085 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2086 * c-tree.h (C_ARRAY_PARAMETER): Define.
2087 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2088 function parameter.
2089
752098c8 20902014-07-02 Jan Hubicka <hubicka@ucw.cz>
2091 Chen Gang <gang.chen.5i5j@gmail.com>
2092
2093 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2094 releasing symbol.
2095
1207866e 20962014-07-01 Marek Polacek <polacek@redhat.com>
2097
2098 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2099 instead of 0 to WARN_FOR_ASSIGNMENT.
2100
7a6bbb76 21012014-07-01 Marek Polacek <polacek@redhat.com>
2102
2103 PR c/58286
2104 * c-typeck.c (convert_for_assignment): Pass
2105 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2106
70575064 21072014-06-30 Marek Polacek <polacek@redhat.com>
2108
2109 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2110 has no_sanitize_undefined attribute.
2111
4879e4cf 21122014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2113
2114 PR middle-end/57541
2115 * c-array-notation.c (fix_builtin_array_notation_fn):
2116 Check for 0 arguments in builtin call. Check that bultin argument is
2117 correct.
2118 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2119 index.
2120
45c5b823 21212014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2122
2123 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2124 qualifiers in __auto_type for atomic types.
2125 (c_parser_typeof_specifier): Discard all type qualifiers in
2126 __typeof__ for atomic types.
2127
430b73ee 21282014-06-25 Marek Polacek <polacek@redhat.com>
2129
2130 PR c/61162
2131 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2132 the return expression to c_finish_return.
2133
9580cb79 21342014-06-25 Jakub Jelinek <jakub@redhat.com>
2135
2136 * c-typeck.c (c_finish_omp_clauses): Make sure
2137 OMP_CLAUSE_LINEAR_STEP has correct type.
2138
c1f445d2 21392014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2140
2141 * c-decl.c: Adjust.
2142
e471cc6f 21432014-06-24 Jakub Jelinek <jakub@redhat.com>
2144
2145 * c-parser.c (c_parser_omp_for_loop): For
2146 #pragma omp parallel for simd move lastprivate clause from parallel
2147 to for rather than simd.
2148
499b7390 21492014-06-23 Marek Polacek <polacek@redhat.com>
2150
2151 * c-typeck.c (parser_build_binary_op): Don't call
2152 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2153
5e68df57 21542014-06-15 Jan Hubicka <hubicka@ucw.cz>
2155
2156 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2157 * c-decl.c (merge_decls): Likewise.
2158
064b0d02 21592014-06-09 Marek Polacek <polacek@redhat.com>
2160
2161 PR c/36446
2162 * c-typeck.c (error_init): Call inform instead of error_at.
2163 (pedwarn_init): Call inform instead of pedwarn.
2164 (warning_init): Call inform instead of warning_at.
2165
71e19e54 21662014-06-07 Jan Hubicka <hubicka@ucw.cz>
2167
2168 * c-decl.c (merge_decls): Use set_decl_section_name.
2169 (duplicate_decls): Remove node if it exists.
2170
95cdf3fd 21712014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2172
2173 PR c/53119
2174 * c-typeck.c (push_init_level, process_init_element,
2175 pop_init_level): Correct check for zero initialization, move
2176 missing brace warning to respect zero initialization.
2177
a07f86a6 21782014-06-05 Marek Polacek <polacek@redhat.com>
2179
2180 PR c/56724
2181 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2182
32dc1512 21832014-06-05 Marek Polacek <polacek@redhat.com>
2184
2185 PR c/49706
2186 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2187 on the left hand side operand of a comparison.
2188
64cf1262 21892014-06-05 Marek Polacek <polacek@redhat.com>
2190
2191 PR c/48062
2192 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2193 Print note only if the warning was printed.
2194
071f6d39 21952014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2196
2197 PR c/58942
2198 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2199 with a pointer.
2200
c69ec07d 22012014-06-03 Marek Polacek <polacek@redhat.com>
2202
2203 PR c/60439
2204 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2205 c_start_case.
2206 * c-tree.h (c_start_case): Update.
2207 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2208 switch condition has boolean value.
2209
f7715905 22102014-06-02 Andrew MacLeod <amacleod@redhat.com>
2211
2212 * c-decl.c: Include builtins.h.
2213 * c-parser.c: Likewise.
2214
dcfff6f9 22152014-05-27 Marek Polacek <polacek@redhat.com>
2216
2217 PR c/56724
2218 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2219 error and warning calls to error_at and warning_at. Pass location of
2220 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2221 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2222 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2223
c048c42c 22242014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2225
2226 PR c/61191
2227 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2228 function parameters.
2229
8c016392 22302014-05-23 Jan Hubicka <hubicka@ucw.cz>
2231
2232 * c-decl.c (merge_decls): Preserve symtab node pointers.
2233 (duplicate_decls): Free new decl.
2234
184a718f 22352014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2236
6ce915ef 2237 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2238 initialization.
2239
184a718f 2240 * c-parser.c (c_parser_omp_target): Return bool values.
2241
22ac3f78 22422014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2243
2244 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2245 num_teams_loc variable to num_thread_limit_loc.
2246
3ab4693e 22472014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2248
2249 * c-array-notation.c (expand_array_notations): Use void_node
2250 instead of void_zero_node.
2251
25a27413 22522014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2253
2254 * c-decl.c (finish_struct): Adjust.
2255 (finish_enum): Likewise.
2256 (bind): Adjust.
2257 (record_inline_static): Likewise.
2258 (push_scope): Likewise.
2259 (make_label): Likewise.
2260 (lookup_label_for_goto): Likewise.
2261 (finish_struct): Likewise.
2262 (finish_enum): Likewise.
2263 (store_parm_decls): Likewise.
2264 (c_push_function_context): Likewise.
2265 * c-lang.h: Remove usage of variable_size gty attribute.
2266 * c-parser.c (c_parse_init): Adjust.
2267 (c_parse_file): Likewise.
2268
172b8440 22692014-05-13 Marek Polacek <polacek@redhat.com>
2270
2271 PR c/61162
2272 * c-typeck.c (convert_for_assignment): Pass location to
2273 WARN_FOR_ASSIGNMENT instead of input_location.
2274
c9e51d25 22752014-05-10 Marek Polacek <polacek@redhat.com>
2276
2277 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2278 maybe_warn_string_init.
2279 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2280 maybe_warn_string_init.
2281 * c-tree.h (maybe_warn_string_init): Update declaration.
2282 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2283 Call pedwarn_init with loc instead of with input_location.
2284 (digest_init): Pass init_loc to maybe_warn_string_init.
2285 (pop_init_level): Call pedwarn_init with loc instead of with
2286 input_location.
2287 (set_init_index): Likewise.
2288 (process_init_element): Likewise.
2289
53de1631 22902014-05-09 Marek Polacek <polacek@redhat.com>
2291
2292 PR c/61096
2293 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2294 (c_parser_initelt): Pass location to set_init_label. Pass array index
2295 location to set_init_index.
2296 * c-tree.h (push_init_level): Update declaration.
2297 (pop_init_level): Likewise.
2298 (set_init_index): Likewise.
2299 (set_init_label): Likewise.
2300 * c-typeck.c (error_init): Add location parameter. Call error_at
2301 instead of error.
2302 (digest_init): Pass init_loc to error_init.
2303 (really_start_incremental_init):
2304 (push_init_level): Add location parameter. Pass loc to pop_init_level
2305 and error_init.
2306 (pop_init_level): Likewise.
2307 (set_designator): Add location parameter. Pass loc to pop_init_level,
2308 push_init_level, and error_init.
2309 (set_init_index): Add location parameter. Pass loc to error_init and
2310 set_designator.
2311 (set_init_label): Likewise.
2312 (output_init_element): Pass loc to error_init.
2313 (process_init_element): Pass loc to error_init, pop_init_level,
2314 pedwarn_init, and push_init_level.
2315
3e5a8b00 23162014-05-09 Marek Polacek <polacek@redhat.com>
2317
2318 PR c/50459
2319 * c-parser.c (c_parser_attributes): Parse the arguments as an
2320 expression-list if the attribute takes identifier.
2321
c2c4ae8d 23222014-05-08 Marek Polacek <polacek@redhat.com>
2323
2324 PR c/61053
2325 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2326 TYPE_ALIGN_UNIT.
2327
2026249a 23282014-05-08 Marek Polacek <polacek@redhat.com>
2329
2330 PR c/61077
2331 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2332 of main.
2333
960d5a55 23342014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2335 Mike Stump <mikestump@comcast.net>
2336 Richard Sandiford <rdsandiford@googlemail.com>
2337
2338 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2339 (finish_enum): Use wide-int interfaces.
2340 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2341 * c-typeck.c (build_c_cast): Likewise.
2342 (set_nonincremental_init_from_string): Likewise.
2343 (c_tree_equal): Likewise.
2344
e0e14cbd 23452014-05-02 Marek Polacek <polacek@redhat.com>
2346
2347 PR c/25801
2348 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2349 Return size_one_node when the type is not complete.
2350 (pointer_diff): Remove comment.
2351 (build_unary_op): Improve error messages.
2352
27ff10cb 23532014-05-02 Marek Polacek <polacek@redhat.com>
2354
2355 * c-typeck.c (c_finish_return): Separate warning_at calls.
2356
68410ce9 23572014-05-02 Marek Polacek <polacek@redhat.com>
2358
2359 * c-tree.h (error_init): Remove declaration.
2360 (pedwarn_init): Likewise.
2361 * c-typeck.c (error_init): Make static and move above.
2362 (pedwarn_init): Likewise.
2363 (warning_init): Move above.
2364 (maybe_warn_string_init): Likewise.
2365
e8e27117 23662014-05-01 Jeff Law <law@redhat.com>
2367
2368 Revert:
2369
2370 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2371 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2372 avoid goto.
2373
971df357 23742014-05-02 Marek Polacek <polacek@redhat.com>
2375
2376 PR c/60784
2377 * c-typeck.c (push_init_level): Set constructor_designated to
2378 p->designated for structures.
2379
de548fe5 23802014-05-01 Marek Polacek <polacek@redhat.com>
2381
2382 PR c/60915
2383 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2384 function-definition has an attribute after the declarator.
2385
053a0ded 23862014-05-01 Marek Polacek <polacek@redhat.com>
2387
2388 PR c/60257
2389 * c-typeck.c (warning_init): Add location_t parameter. Call
2390 warning_at instead of warning.
2391 (push_init_level): Pass input_location to warning_init.
2392 (add_pending_init): Add location_t parameter. Pass loc to
2393 warning_init.
2394 (set_nonincremental_init): Pass input_location to add_pending_init.
2395 (set_nonincremental_init_from_string): Likewise.
2396 (output_init_element): Pass loc to warning_init and to
2397 add_pending_init.
2398
694296f2 23992014-05-01 Marek Polacek <polacek@redhat.com>
2400
2401 PR c/43395
2402 * c-typeck.c (c_finish_return): Distinguish between label and variable
2403 when warning about returning local address.
2404
86bbd7f9 24052014-05-01 Marek Polacek <polacek@redhat.com>
2406
2407 PR c/29467
2408 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2409 in C89 mode.
2410
e4ab2ef3 24112014-05-01 Marek Polacek <polacek@redhat.com>
2412
2413 PR c/43245
2414 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2415 instead of 0 to WARN_FOR_QUALIFIERS.
2416
ca3999cb 24172014-05-01 Marek Polacek <polacek@redhat.com>
2418
2419 PR c/56989
2420 * c-typeck.c (default_conversion): Use better location for
2421 error call.
2422
52cc0072 24232014-04-30 Marek Polacek <polacek@redhat.com>
2424
2425 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2426 also when SANITIZE_FLOAT_DIVIDE is on.
2427
af379dd3 24282014-04-30 Marek Polacek <polacek@redhat.com>
2429
2430 PR c/60139
2431 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2432 and pedwarn_init. Use loc insted of input_location.
2433
b069c2a0 24342014-04-30 Marek Polacek <polacek@redhat.com>
2435
2436 PR c/60351
2437 * c-typeck.c (build_binary_op): Use location when warning about
2438 shift count.
2439
4a026b48 24402014-04-25 Marek Polacek <polacek@redhat.com>
2441
2442 PR c/18079
2443 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2444 always_inline/noinline and hot/cold attributes.
2445
adc93f31 24462014-04-25 Marek Polacek <polacek@redhat.com>
2447
2448 PR c/60114
2449 * c-parser.c (c_parser_initelt): Pass input_location to
2450 process_init_element.
2451 (c_parser_initval): Pass loc to process_init_element.
2452 * c-tree.h (process_init_element): Adjust declaration.
2453 * c-typeck.c (push_init_level): Pass input_location to
2454 process_init_element.
2455 (pop_init_level): Likewise.
2456 (set_designator): Likewise.
2457 (output_init_element): Add location_t parameter. Pass loc to
2458 digest_init.
2459 (output_pending_init_elements): Pass input_location to
2460 output_init_element.
2461 (process_init_element): Add location_t parameter. Pass loc to
2462 output_init_element.
2463
e1029911 24642014-04-24 Jakub Jelinek <jakub@redhat.com>
2465
2466 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2467 atomic-clause, allow comma in between atomic-clause and
2468 seq_cst.
2469
9f0a7bc6 24702014-04-22 Jakub Jelinek <jakub@redhat.com>
2471
2472 PR c/59073
2473 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2474 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2475
094da06d 24762014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2477
2478 PR middle-end/60469
2479 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2480 create_tmp_var instead build_decl for creating temps.
2481 (build_array_notation_expr): Likewise.
2482 (fix_conditional_array_notations_1): Likewise.
2483 (fix_array_notation_expr): Likewise.
2484 (fix_array_notation_call_expr): Likewise.
2485
5a672e62 24862014-03-28 Jakub Jelinek <jakub@redhat.com>
2487
2488 PR c++/60689
2489 * c-tree.h (c_build_function_call_vec): New prototype.
2490 * c-typeck.c (build_function_call_vec): Don't call
2491 resolve_overloaded_builtin here.
2492 (c_build_function_call_vec): New wrapper function around
2493 build_function_call_vec. Call resolve_overloaded_builtin here.
2494 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2495 Call c_build_function_call_vec instead of build_function_call_vec.
2496 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2497 * c-decl.c (finish_decl): Likewise.
2498
f40f5e0e 24992014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2500
2501 PR c/55383
2502 * c-typeck.c: Use correct format string in cast-qual warning
2503
9ec099a3 25042014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2505
2506 * c-decl.c (c_decl_attributes): Use
2507 lang_hooks.types.omp_mappable_type.
2508 * c-typeck.c (c_finish_omp_clauses): Likewise.
2509
3bfdc94f 25102014-03-06 Marek Polacek <polacek@redhat.com>
2511
2512 PR c/60197
2513 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2514 of checking tree code.
2515
8f1128f8 25162014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2517
2518 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2519 (c_parser_parameter_declaration): Likewise.
2520
977b1853 25212014-02-19 Marek Polacek <polacek@redhat.com>
2522
2523 PR c/60195
2524 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2525 Call mark_exp_read on exp.value.
2526 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2527 TREE_ADDRESSABLE on old instead of val.
2528 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2529
825cd6ef 25302014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2531
2532 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2533 C_EXPR_APPEND by vec_safe_push.
2534 * c-tree.h (C_EXPR_APPEND): Remove.
2535
ec761d5a 25362014-01-31 Marek Polacek <polacek@redhat.com>
2537
2538 PR c/59963
2539 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2540 build_function_call_vec.
2541 (build_function_call): Likewise.
2542 (build_atomic_assign): Likewise.
2543 (build_function_call_vec): Add arg_loc parameter. Use it.
2544 (convert_arguments): Likewise.
2545 (convert_for_assignment): Rename rhs_loc to expr_loc.
2546 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2547 (c_parser_objc_keywordexpr): Likewise.
2548 (c_parser_postfix_expression_after_primary): Call
2549 build_function_call_vec with expr_loc rather than op_loc.
2550 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2551 build_function_call_vec.
2552 (c_parser_expr_list): Add locations parameter. Fill it with locations
2553 of function arguments.
2554 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2555
22a75734 25562014-01-30 Marek Polacek <polacek@redhat.com>
2557
2558 PR c/59940
2559 * c-typeck.c (build_function_call_vec): Use loc parameter.
2560 (convert_arguments): Add location parameter. Use it.
2561 (ep_convert_and_check): Likewise.
2562 (build_atomic_assign): Adjust convert_for_assignment call.
2563 (build_modify_expr): Likewise.
2564 (digest_init): Likewise.
2565 (c_finish_return): Likewise.
2566 (build_conditional_expr): Adjust ep_convert_and_check calls.
2567 (convert_for_assignment): Add rhs_loc parameter. Use it.
2568 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2569 calls.
2570
29f580ac 25712014-01-30 Richard Biener <rguenther@suse.de>
2572
2573 PR c/59905
2574 * c-typeck.c (build_function_call_vec): Do not replace calls
2575 to a function via an incompatible type with a runtime abort.
2576
a89e6c15 25772014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2578
2579 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2580 flag_enable_cilkplus with flag_cilkplus.
2581 (c_parser_direct_declarator_inner): Likewise.
2582 (c_parser_attribute_any_word): Likewise.
2583 (c_parser_attributes): Likewise.
2584 (c_parser_compound_statement): Likewise.
2585 (c_parser_statement_after_labels): Likewise.
2586 (c_parser_if_statement): Likewise.
2587 (c_parser_switch_statement): Likewise.
2588 (c_parser_do_statement): Likewise.
2589 (c_parser_for_statement): Likewise.
2590 (c_parser_unary_expression): Likewise.
2591 (c_parser_postfix_expression): Likewise.
2592 (c_parser_postfix_expression_after_primary): Likewise.
2593 (c_parser_postfix_expression_after_primary): Likewise.
2594 (c_parser_omp_clause_name): Likewise.
2595 (c_finish_omp_declare_simd): Likewise.
2596 (c_parser_cilk_verify_simd): Likewise.
2597 * c-typeck.c (build_array_ref): Likewise.
2598 (build_function_call_vec): Likewise.
2599 (convert_arguments): Likewise.
2600 (build_compound_expr): Likewise.
2601 (c_finish_return): Likewise.
2602 (c_finish_if_stmt): Likewise.
2603 (c_finish_loop): Likewise.
2604 (build_binary_op): Likewise.
2605
2623625f 26062014-01-23 Marek Polacek <polacek@redhat.com>
2607
2608 PR c/59846
2609 * c-typeck.c (parser_build_binary_op): Use location instead of
2610 input_location.
2611 (build_binary_op): Pass location to shorten_compare.
2612
46da3601 26132014-01-23 Marek Polacek <polacek@redhat.com>
2614
2615 PR c/58346
2616 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2617 an empty aggregate.
2618
9a9db3c1 26192014-01-23 Marek Polacek <polacek@redhat.com>
2620
2621 PR c/59871
2622 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2623 of a comma expression.
2624 (emit_side_effect_warnings): Likewise.
2625
69c9b607 26262014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2627
2628 PR c/59825
2629 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2630 function to use walk_tree and moved a lot of its functionality to
2631 expand_array_notations.
2632 (expand_array_notations): New function.
2633
7e005ab5 26342014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2635
2636 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2637 attribute an attribute without value.
2638
d6779b5f 26392014-01-23 Jakub Jelinek <jakub@redhat.com>
2640
2641 PR middle-end/58809
2642 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2643 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2644
ec431042 26452014-01-22 Marek Polacek <polacek@redhat.com>
2646
2647 PR c/59891
2648 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2649 of remove_c_maybe_const_expr on op1 and op2.
2650
1248c663 26512014-01-15 Jakub Jelinek <jakub@redhat.com>
2652
2653 PR c/58943
2654 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2655 effects, preevaluate rhs using SAVE_EXPR first.
2656
0bc789fc 26572014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2658
2659 PR c++/59631
2660 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2661 statements with if-elseif statements.
2662
6685d11c 26632014-01-06 Marek Polacek <polacek@redhat.com>
2664
2665 PR c/57773
2666 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2667 defined bit-field types only in ISO C.
2668
3aea1f79 26692014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2670
2671 Update copyright years
2672
e4f22041 26732014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2674
2675 * c-array-notation.c: Use the standard form for the copyright notice.
2676
74acc703 26772013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2678
2679 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2680 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2681 field in parser is not empty. If not-empty, call the function
2682 c_parser_finish_omp_declare_simd.
2683 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2684 between SIMD-enabled functions and #pragma simd. Added new parameter.
2685 (c_parser_cilk_all_clauses): Modified the usage of the function
2686 c_parser_cilk_clause_vectorlength as mentioned above.
2687 (c_parser_cilk_simd_fn_vector_attrs): New function.
2688 (c_finish_cilk_simd_fn_tokens): Likewise.
2689 (is_cilkplus_vector_p): Likewise.
2690 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2691 "nomask," and "mask" strings in clause name.
2692 (c_parser_omp_all_clauses): Added 3 new case statements:
2693 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2694 PRAGMA_CILK_CLAUSE_NOMASK.
2695 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2696 check for vector attribute and if so call the function
2697 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2698 called the function c_finish_cilk_simd_fn_tokens.
2699 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2700 parser field is non-empty. If so, parse them as you would parse
2701 the omp declare simd pragma.
2702 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2703 Added a check when step is a parameter and flag it as error.
2704 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2705 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2706 pragma_omp_clause.
2707
395dc01c 27082013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2709
2710 * c-parser.c (c_parser_omp_parallel): Fix description.
2711
433e804e 27122013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2713
2714 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2715 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2716 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2717 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2718
a179a7dc 27192013-12-04 Joseph Myers <joseph@codesourcery.com>
2720
2721 PR c/52023
2722 * c-parser.c (c_parser_alignas_specifier): Use
2723 c_sizeof_or_alignof_type instead of c_alignof.
2724 (c_parser_alignof_expression): Likewise, with min_alignof
2725 parameter depending on alignof spelling used.
2726
bdf1e3c7 27272013-12-04 Marek Polacek <polacek@redhat.com>
2728
2729 PR c/54113
2730 * c-decl.c (start_function): Don't warn for missing prototype for
2731 inline functions.
2732
05e8f674 27332013-12-03 Marek Polacek <polacek@redhat.com>
2734
2735 PR c/59351
2736 * c-decl.c (build_compound_literal): Allow compound literals with
2737 empty initial value.
2738
39f74d66 27392013-12-02 Joseph Myers <joseph@codesourcery.com>
2740
2741 PR c/58235
2742 * c-typeck.c (build_modify_expr): Diagnose assignment to
2743 expression with array type.
2744
f221adca 27452013-11-29 Joseph Myers <joseph@codesourcery.com>
2746
2747 PR c/42262
2748 * c-typeck.c (process_init_element): Do not treat a string as
2749 initializing a whole array when used with a designator for an
2750 individual element.
2751
75bce827 27522013-11-29 Joseph Myers <joseph@codesourcery.com>
2753
2754 PR c/57574
2755 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2756 an inline function following a static declaration.
2757
dc133326 27582013-11-28 Jakub Jelinek <jakub@redhat.com>
2759
2760 PR c/59310
2761 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2762 to p_name before calling c_parser_omp_teams instead of after.
2763 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2764 argument. Remove unused p_name variable.
2765
d09768a4 27662013-11-27 Aldy Hernandez <aldyh@redhat.com>
2767 Jakub Jelinek <jakub@redhat.com>
2768
2769 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2770 external_scope is NULL.
2771
73fd9cbe 27722013-11-27 Tom de Vries <tom@codesourcery.com>
2773 Marc Glisse <marc.glisse@inria.fr>
2774
2775 PR c++/59032
2776 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2777
bc61cadb 27782013-11-22 Andrew MacLeod <amacleod@redhat.com>
2779
2780 * c-typeck.c: Add required include files from gimple.h.
2781
3df42822 27822013-11-22 David Malcolm <dmalcolm@redhat.com>
2783
2784 * c-decl.c (define_label, shadow_tag_warned)
2785 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2786 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2787 (declspecs_add_type): Remove use of in_system_header macro.
2788 * c-parser.c (c_parser_unary_expression): Likewise.
2789 * c-typeck.c (store_init_value, process_init_element)
2790 (c_start_case): Likewise.
2791
2792 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2793 macro.
2794
2795 * c-parser.c (c_parser_set_source_position_from_token): Remove
2796 reference to in_system_header from comment.
2797
08f817b3 27982013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2799
2800 * c-decl.c (grokdeclarator): Update comment to refer to
2801 tree_to_[su]hwi rather than tree_low_cst.
2802
6a0712d4 28032013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2804
2805 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2806 tree_to_uhwi throughout.
2807
fcb97e84 28082013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2809
2810 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2811 throughout.
2812
35ec552a 28132013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2814
2815 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2816 throughout.
2817
f2697631 28182013-11-15 Aldy Hernandez <aldyh@redhat.com>
2819
2820 * c-parser.c (c_parser_cilk_simd): New.
2821 (c_parser_cilk_verify_simd): New.
2822 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2823 (c_parser_omp_for_loop): Add case for NE_EXPR.
2824 Set c_break_label for CILK_SIMD.
2825 (c_parser_cilk_clause_vectorlength): New.
2826 (c_parser_cilk_clause_linear): New.
2827 (c_parser_cilk_clause_name): New.
2828 (c_parser_cilk_all_clauses): New.
2829 * c-typeck.c (build_unary_op): Pass location argument to
2830 readonly_error.
2831 (build_modify_expr): Same.
2832 (build_asm_expr): Same.
2833 (c_finish_bc_stmt): Error on break/continue in loops.
2834
e795d6e1 28352013-11-14 Andrew MacLeod <amacleod@redhat.com>
2836
2837 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2838
9ed99284 28392013-11-14 Diego Novillo <dnovillo@google.com>
2840
2841 * c-decl.c: Include print-tree.h.
2842 Include stor-layout.h.
2843 Include varasm.h.
2844 Include attribs.h.
2845 Include stringpool.h.
2846 * c-lang.c: Include fold-const.h.
2847 * c-parser.c: Include stringpool.h.
2848 Include attribs.h.
2849 Include stor-layout.h.
2850 Include varasm.h.
2851 Include trans-mem.h.
2852 * c-typeck.c: Include stor-layout.h.
2853 Include trans-mem.h.
2854 Include varasm.h.
2855 Include stmt.h.
2856
4fba5eb9 28572013-11-13 Joseph Myers <joseph@codesourcery.com>
2858
2859 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2860 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2861 __auto_type.
2862 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2863 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2864 RID_AUTO_TYPE.
2865 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2866 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2867 (c_parser_declarator, c_parser_direct_declarator_inner)
2868 (c_parser_parameter_declaration, c_parser_type_name): All callers
2869 changed.
2870 (c_parser_declaration_or_fndef): Handle declarations with type
2871 determined from the initializer.
2872
a8783bee 28732013-11-12 Andrew MacLeod <amacleod@redhat.com>
2874
e795d6e1 2875 * c-typeck.c: Include gimplify.h.
a8783bee 2876
d184e0c0 28772013-11-12 Joseph Myers <joseph@codesourcery.com>
2878
2879 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2880 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2881 comment.
2882 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2883 or _Thread_local as appropriate in diagnostics.
2884 (build_null_declspecs): Initialize ret->thread_gnu_p.
2885 (declspecs_add_scspec): Handle either __thread or _Thread_local
2886 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2887 pedantic. Do not disallow _Thread_local extern and _Thread_local
2888 static.
2889
b560fabd 28902013-11-07 Joseph Myers <joseph@codesourcery.com>
2891 Andrew MacLeod <amacleod@redhat.com>
2892
2893 * c-aux-info.c (gen_type): Handle atomic qualifier.
2894 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2895 qualifiers when compating types.
2896 (shadow_tag_warned): Handle atomic_p in declspecs.
2897 (quals_from_declspecs): Likewise.
2898 (start_decl): Use c_type_promotes_to when promoting argument
2899 types.
2900 (grokdeclarator): Handle _Atomic.
2901 (get_parm_info): Diagnose any qualifier on "void" as only
2902 parameter.
2903 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2904 comparing types. Use c_type_promotes_to when promoting argument
2905 types.
2906 (finish_function): Use c_type_promotes_to when promoting argument
2907 types.
2908 (build_null_declspecs): Handle atomic_p in declspecs.
2909 (declspecs_add_qual): Handle RID_ATOMIC.
2910 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2911 (c_token_starts_declspecs): Handle RID_ATOMIC.
2912 (c_parser_declspecs): Handle atomic type specifiers and
2913 qualifiers.
2914 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2915 from types of expressions with atomic type.
2916 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2917 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2918 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2919 (c_parser_statement_after_labels, c_parser_switch_statement)
2920 (c_parser_for_statement, c_parser_expr_no_commas)
2921 (c_parser_conditional_expression, c_parser_binary_expression)
2922 (c_parser_cast_expression, c_parser_unary_expression)
2923 (c_parser_postfix_expression)
2924 (c_parser_postfix_expression_after_primary, c_parser_expression):
2925 Use convert_lvalue_to_rvalue.
2926 (c_parser_expression_conv, c_parser_expr_list): Document
2927 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2928 (c_parser_objc_synchronized_statement): Use
2929 convert_lvalue_to_rvalue.
2930 (c_parser_objc_selector): Handle RID_ATOMIC.
2931 (c_parser_objc_receiver, c_parser_array_notation): Use
2932 convert_lvalue_to_rvalue.
2933 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2934 _Atomic (type-name).
2935 (struct c_declspecs): Add atomic_p field.
2936 (convert_lvalue_to_rvalue): Declare.
2937 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2938 corresponding atomic types.
2939 (qualify_type): Don't add _Atomic qualifiers from second argument.
2940 (comp_target_types): Do not allow _Atomic mismatches.
2941 (type_lists_compatible_p): Do not remove atomic qualifiers when
2942 comparing types.
2943 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2944 (build_atomic_assign): New functions.
2945 (build_unary_op): Use build_atomic_assign for atomic increment and
2946 decrement.
2947 (build_conditional_expr): Do not treat _Atomic void as a qualified
2948 version of void.
2949 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2950 (find_anonymous_field_with_type, convert_to_anonymous_field)
2951 (convert_for_assignment): Do not remove atomic qualifiers when
2952 comparing types.
2953 (digest_init): Do not accept initialization of arrays of atomic
2954 elements by string constants.
2955 (build_asm_expr): Use convert_lvalue_to_rvalue.
2956 (build_binary_op): Do not treat _Atomic void as a qualified
2957 version of void.
2958
8b023e7c 29592013-11-06 DJ Delorie <dj@redhat.com>
2960
2961 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2962 both explicit and builtin, print the location of the explicit one.
2963
c630ef93 29642013-11-05 Tobias Burnus <burnus@net-b.de>
2965
2966 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2967 c_parser_omp_distribute, c_parser_omp_teams,
2968 c_parser_omp_target, c_parser_omp_declare): Handle
2969 -fopenmp-simd.
2970
2c4c3477 29712013-11-03 Marek Polacek <polacek@redhat.com>
2972
2973 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2974
df205251 29752013-11-01 Jakub Jelinek <jakub@redhat.com>
2976
2977 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2978 check_dup_generic at the end, unless remove is true.
2979 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2980 remove = true;.
2981 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2982
23871d0c 29832013-10-31 Jakub Jelinek <jakub@redhat.com>
2984
2985 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2986 with decl that is not pointer nor array.
2987
d037099f 29882013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2989
2990 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2991 a spawning function is found.
2992 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2993 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2994 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2995 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2996 case.
2997 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2998 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2999 expr.
3000 (c_finish_return): Added a check to reject _Cilk_spawn in return
3001 expression.
3002 (build_cilk_spawn): New function.
3003 (build_cilk_sync): Likewise.
3004 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3005
4c90c04c 30062013-10-27 Tobias Burnus <burnus@net-b.de>
3007
3008 PR other/33426
3009 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3010 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3011 (c_parser_statement_after_labels): Update calls.
3012
48a972c8 30132013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 3014
3015 PR other/33426
3016 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3017 Handle PRAGMA_IVDEP.
3018 (c_parser_statement_after_labels): Update call.
3019
12f86df0 30202013-10-24 Marek Polacek <polacek@redhat.com>
3021
3022 * c-parser.c (c_parser_struct_declaration): Add a comment.
3023 (c_parser_declarator): Don't allow _Alignas here.
3024
7740abd8 30252013-10-17 Andrew MacLeod <amacleod@redhat.com>
3026
3027 * c-parser.c: Include omp-low.h.
3028 * c-typeck.c: Likewise.
3029
43d03c23 30302013-10-17 Marek Polacek <polacek@redhat.com>
3031
3032 PR c/58267
3033 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3034 Document syntax of the array-declarator.
3035 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3036 are not permitted.
3037 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3038 (c_parser_struct_declaration): Likewise.
3039 (c_parser_declarator): Likewise.
3040 (c_parser_direct_declarator_inner): Likewise.
3041 (c_parser_parameter_declaration): Likewise.
3042 (c_parser_type_name): Likewise.
3043
bc7bff74 30442013-10-11 Jakub Jelinek <jakub@redhat.com>
3045
3046 * c-lang.h (current_omp_declare_target_attribute): New extern
3047 decl.
3048 * c-parser.c: Include c-lang.h.
3049 (struct c_parser): Change tokens to c_token *.
3050 Add tokens_buf field. Change tokens_avail type to unsigned int.
3051 (c_parser_consume_token): If parser->tokens isn't
3052 &parser->tokens_buf[0], increment parser->tokens.
3053 (c_parser_consume_pragma): Likewise.
3054 (enum pragma_context): Add pragma_struct and pragma_param.
3055 (c_parser_external_declaration): Adjust
3056 c_parser_declaration_or_fndef caller.
3057 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3058 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3059 Adjust recursive call.
3060 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3061 of pragma_external.
3062 (c_parser_parameter_declaration): Use pragma_param instead of
3063 pragma_external.
3064 (c_parser_compound_statement_nostart, c_parser_label,
3065 c_parser_for_statement): Adjust
3066 c_parser_declaration_or_fndef callers.
3067 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3068 it through to c_parser_conditional_expression.
3069 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3070 pass it through to c_parser_binary_expression. Adjust recursive
3071 call.
3072 (c_parser_binary_expression): Remove prec argument, add
3073 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3074 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3075 binop matches it, use build2 instead of parser_build_binary_op.
3076 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3077 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3078 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3079 Handle pragma_struct and pragma_param the same as pragma_external.
3080 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3081 (c_parser_omp_variable_list): Parse array sections for
3082 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3083 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3084 (c_parser_omp_clause_reduction): Handle user defined reductions.
3085 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3086 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3087 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3088 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3089 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3090 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3091 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3092 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3093 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3094 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3095 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3096 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3097 (c_parser_omp_for_loop): Add CODE argument, pass it through
3098 to c_finish_omp_for. Change last argument to cclauses,
3099 and adjust uses to grab parallel clauses from the array of all
3100 the split clauses. Adjust c_parser_binary_expression,
3101 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3102 (omp_split_clauses): New function.
3103 (c_parser_omp_simd): New function.
3104 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3105 Allow the function to be called also when parsing combined constructs,
3106 and call c_parser_omp_simd when parsing for simd.
3107 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3108 #pragma omp section, require exactly one structured-block instead of
3109 sequence of statements.
3110 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3111 Allow the function to be called also when parsing combined constructs.
3112 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3113 Allow the function to be called also when parsing combined
3114 constructs.
3115 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3116 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3117 c_parser_omp_teams, c_parser_omp_target_data,
3118 c_parser_omp_target_update, c_parser_omp_target,
3119 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3120 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3121 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3122 (c_parser_omp_construct): Add p_name and mask vars. Handle
3123 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3124 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3125 and c_parser_omp_sections callers.
3126 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3127 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3128 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3129 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3130 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3131 OMP_CLAUSE_DEPEND.
3132 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3133 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3134 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3135 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3136 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3137 * c-typeck.c: Include tree-inline.h.
3138 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3139 handle_omp_array_sections_1, handle_omp_array_sections,
3140 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3141 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3142 user defined reductions.
3143 (c_tree_equal): New function.
3144 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3145 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3146 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3147 c_check_omp_declare_reduction_r): New prototypes.
3148 * c-decl.c (current_omp_declare_target_attribute): New variable.
3149 (c_decl_attributes): New function.
3150 (start_decl, start_function): Use it instead of decl_attributes.
3151 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3152 c_omp_reduction_decl, c_omp_reduction_lookup,
3153 c_check_omp_declare_reduction_r): New functions.
3154
3ce7d1bd 31552013-09-25 Tom Tromey <tromey@redhat.com>
3156
3157 * Make-lang.in (c/gccspec.o): Remove.
3158 (CFLAGS-c/gccspec.o): New variable.
3159 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3160 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3161 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3162
96da1c1d 31632013-09-25 Tom Tromey <tromey@redhat.com>
3164
3165 * Make-lang.in (c/gccspec.o): Don't use subshell.
3166
1b309377 31672013-09-18 Marek Polacek <polacek@redhat.com>
3168
3169 PR sanitize/58443
3170 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3171 Remove unnecessary check.
3172
05f893e1 31732013-09-18 Marek Polacek <polacek@redhat.com>
3174
3175 PR sanitizer/58411
3176 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3177 no_sanitize_undefined attribute.
3178
bda0b9d2 31792013-09-13 Kai Tietz <ktietz@redhat.com>
3180
3181 PR target/57848
3182 * c-decl.c (c_builtin_function_ext_scope): Remove
3183 wrong assumption that it is never called on prexisting
3184 symbol.
3185
73437615 31862013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3187
3188 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3189
eaab24b9 31902013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3191
3192 * c-objc-common.c (c_tree_printer): Tidy.
3193
9e46467d 31942013-08-30 Marek Polacek <polacek@redhat.com>
3195
3196 * c-typeck.c (build_binary_op): Add division by zero and shift
3197 instrumentation.
3198
f8234178 31992013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 3200 Joseph Myers <joseph@codesourcery.com>
f8234178 3201
c90a7d10 3202 PR c/35649
f8234178 3203 * c-typeck.c (c_common_type): Prefer double_type_node over
3204 other REAL_TYPE types with the same precision.
3205 (convert_arguments): Likewise.
3206
6f07f480 32072013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3208
3209 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3210 (c_initialize_diagnostics): Call a destructor for the early printer.
3211
eed6bc21 32122013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3213
3214 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3215 printer initialization.
3216
57717943 32172013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 3218
57717943 3219 PR c/57490
3220 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3221 check for truth values.
3222 (expand_array_notation_exprs): Added truth values case. Removed an
3223 unwanted else. Added for-loop to walk through subtrees in default
3224 case.
3225
a94db6b0 32262013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3227
3228 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3229
e76163a9 32302013-07-23 Joseph Myers <joseph@codesourcery.com>
3231
3232 * c-parser.c (struct c_generic_association): Fix typo.
3233
7aa04c8d 32342013-07-23 Tom Tromey <tromey@redhat.com>
3235 Joseph Myers <joseph@codesourcery.com>
3236
3237 * c-parser.c (struct c_generic_association): New.
3238 (c_generic_association_d): New typedef.
3239 (c_parser_generic_selection): New function.
3240 (c_parser_postfix_expression): Handle RID_GENERIC.
3241
76bbe4ca 32422013-07-13 Jason Merrill <jason@redhat.com>
3243
3244 PR c++/57793
3245 * c-decl.c (finish_struct): Check for too-large class.
3246
21ebaa24 32472013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 3248
3249 PR c/57821
3250 * c-typeck.c (set_init_index): When folding, check for index overflow.
3251
936c3081 32522013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3253
3254 * c-parser.c (c_parser_array_notation): Removed rejection of array
3255 notations in an array of function pointers.
3256
50acebe0 32572013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3258
3259 * c-array-notation.c (make_triplet_val_inv): New function.
3260 (create_cmp_incr): Likewise.
3261 (create_array_refs): Likewise.
3262 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3263 Also modularized common parts between functions and called the function.
3264 (build_array_notation_expr): Likewise.
3265 (fix_conditional_array_notations_1): Likewise.
3266 (fix_array_notation_expr): Likewise.
3267 (fix_array_notation_call_expr): Likewise.
3268
01e6cdb4 32692013-06-18 Marek Polacek <polacek@redhat.com>
3270
3271 PR c/57630
3272 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3273
6a3adac6 32742013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3275
3276 * c-array-notation.c (build_array_notation_expr): Reject array notation
3277 mismatch between LHS and RHS even inside a call_expr. Also, removed
3278 a couple while statements that were dead code.
3279
62aab3f3 32802013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3281
3282 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3283 excessive precision expressions in function parameters. Also removed
3284 couple unwanted while statements.
3285
bfc83720 32862013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3287
3288 * c-array-notation.c (expand_array_notation_exprs): Added
3289 ARRAY_NOTATION_REF case.
3290
09970d67 32912013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3292
3293 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3294 function to c-family/array-notation-common.c.
3295 (is_cilkplus_reduce_builtin): Likewise.
3296 (find_rank): Likewise.
3297 (extract_array_notation_exprs): Likewise.
3298 (replace_array_notations): Likewise.
3299 (find_inv_trees): Likewise.
3300 (replace_inv_trees): Likewise.
3301 (contains_array_notation_expr): Likewise.
3302 (find_correct_array_notation_type): Likewise.
3303 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3304 (struct inv_list): Moved this to c-family/array-notation-common.c.
3305 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3306
6e13bc01 33072013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3308
3309 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3310 reduction functions outside the for-loop. Added a check if the fundecl
3311 is non-NULL. Finally, removed an unwanted if-statement, and made the
3312 body unconditional.
3313
cc92dddc 33142013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3315
3316 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3317 condition of the if-statement matches the rank of else-block and then-
3318 block when array notations are used.
3319 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3320 expression after the entire function body is parsed.
3321 (c_parser_expr_no_commas): Delayed creating array notation expressions
3322 to the end of function parsing.
3323 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3324 whole if-statement instead of just the condition.
3325 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3326
eddc63fd 33272013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3328
3329 PR c/57474
3330 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3331 array to NULL_TREE if they are unused. Also added a check for the
3332 field to be NULL before its fields are used in future.
3333
a2115a4a 33342013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3335
3336 PR bootstrap/57450
3337 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3338 (build_array_notation_expr): Likewise.
3339
3c6d4197 33402013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3341
3342 * c-typeck.c (build_array_ref): Added a check to see if array's
3343 index is greater than one. If true, then emit an error.
3344 (build_function_call_vec): Exclude error reporting and checking
3345 for builtin array-notation functions.
3346 (convert_arguments): Likewise.
3347 (c_finish_return): Added a check for array notations as a return
3348 expression. If true, then emit an error.
3349 (c_finish_loop): Added a check for array notations in a loop
3350 condition. If true then emit an error.
3351 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3352 (build_binary_op): Added a check for array notation expr inside
3353 op1 and op0. If present, we call another function to find correct
3354 type.
3355 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3356 * c-parser.c (c_parser_compound_statement): Check if array
3357 notation code is used in tree, if so, then transform them into
3358 appropriate C code.
3359 (c_parser_expr_no_commas): Check if array notation is used in LHS
3360 or RHS, if so, then build array notation expression instead of
3361 regular modify.
3362 (c_parser_postfix_expression_after_primary): Added a check for
3363 colon(s) after square braces, if so then handle it like an array
3364 notation. Also, break up array notations in unary op if found.
3365 (c_parser_direct_declarator_inner): Added a check for array
3366 notation.
3367 (c_parser_compound_statement): Added a check for array notation in
3368 a stmt. If one is present, then expand array notation expr.
3369 (c_parser_if_statement): Likewise.
3370 (c_parser_switch_statement): Added a check for array notations in
3371 a switch statement's condition. If true, then output an error.
3372 (c_parser_while_statement): Similarly, but for a while.
3373 (c_parser_do_statement): Similarly, but for a do-while.
3374 (c_parser_for_statement): Similarly, but for a for-loop.
3375 (c_parser_unary_expression): Check if array notation is used in a
3376 pre-increment or pre-decrement expression. If true, then expand
3377 them.
3378 (c_parser_array_notation): New function.
3379 * c-array-notation.c: New file.
3380 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3381
2c1c8a2c 33822013-05-23 Mike Stump <mikestump@comcast.net>
3383
3384 * c-typeck.c (convert_for_assignment): Handle references to memory
3385 spaces better.
3386
be5f9e46 33872013-05-16 Jason Merrill <jason@redhat.com>
3388
3389 * Make-lang.in (cc1$(exeext)): Use link mutex.
3390
9205a6cc 33912013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3392
3393 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3394 to simply use OPT_Wpointer_arith.
3395 (build_unary_op): Likewise.
3396
0b049e15 33972013-04-03 Jakub Jelinek <jakub@redhat.com>
3398
3399 PR c/19449
3400 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3401 argument. If set, or it temporarily for parsing of the first
3402 argument into force_folding_builtin_constant_p.
3403 (c_parser_postfix_expression): Adjust callers.
3404
8e966116 34052013-03-21 Richard Biener <rguenther@suse.de>
3406
3407 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3408 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3409
b862f263 34102013-02-12 Marek Polacek <polacek@redhat.com>
3411
3412 PR c/44938
3413 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3414 origtypes to NULL.
3415
54550ecb 34162013-01-24 Jakub Jelinek <jakub@redhat.com>
3417
3418 PR c/56078
3419 * c-typeck.c (set_nonincremental_init_from_string): If
3420 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3421 returned false.
3422 (process_init_element): Likewise.
3423
035b65e2 34242012-12-20 Jakub Jelinek <jakub@redhat.com>
3425
3426 PR c++/55619
3427 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3428 argument, don't call default_function_array_conversion
3429 nor c_fully_fold here.
3430 (c_parser_asm_statement): Adjust callers.
3431 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3432 and outputs here, and call default_function_array_conversion
3433 on inputs that don't need to be addressable.
3434
7cbb7f1a 34352012-12-18 Jakub Jelinek <jakub@redhat.com>
3436
3437 PR c/39464
3438 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3439 warning require that both c_common_unsigned_type as well as
3440 c_common_signed_type is the same for both mvl and mvr types.
3441
f1f41a6c 34422012-11-16 Diego Novillo <dnovillo@google.com>
3443
3444 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3445
3446 * c-common.c: Use new vec API in vec.h.
3447 * c-common.h: Likewise.
3448 * c-gimplify.c: Likewise.
3449 * c-pragma.c: Likewise.
3450 * c-pretty-print.c: Likewise.
3451 * c-pretty-print.h: Likewise.
3452 * c-semantics.c: Likewise.
3453 * c-decl.c: Likewise.
3454 * c-parser.c: Likewise.
3455 * c-tree.h: Likewise.
3456 * c-typeck.c: Likewise.
3457
8b447d3f 34582012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3459
3460 PR c++/54930
3461 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3462
08fc5390 34632012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3464
3465 PR c/53066
3466 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3467 shadows a function, unless the variable is a function or a
3468 pointer-to-function.
3469
57f872a2 34702012-10-12 Jakub Jelinek <jakub@redhat.com>
3471
3472 PR c/54381
3473 * c-parser.c (struct c_tree_loc_pair): Removed.
3474 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3475 add location_t * and tree * arguments, fill in array of 3
3476 sizeof_arg trees and corresponding locs.
3477 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3478 c_parser_expr_list callers.
3479 (c_parser_postfix_expression_after_primary): Likewise. Pass
3480 array of 3 sizeof_arg trees and locs (corresponding to first
3481 3 arguments) to sizeof_pointer_memaccess_warning.
3482
d1455aa3 34832012-10-09 Lawrence Crowl <crowl@google.com>
3484
3485 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3486 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3487 hash table.
3488
b0e7825e 34892012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3490
3491 PR c++/54194
3492 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3493 call.
3494
41ed701a 34952012-10-09 Marc Glisse <marc.glisse@inria.fr>
3496
3497 PR c++/54427
3498 * c-typeck.c: Include c-common.h.
3499 (enum stv_conv): Moved to c-common.h.
3500 (scalar_to_vector): Moved to c-common.c.
3501 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3502 * Make-lang.in: c-typeck.c depends on c-common.h.
3503
ef34afc1 35042012-10-04 Arnaud Charlet <charlet@adacore.com>
3505
3506 * c-decl.c (c_write_global_declarations): Fix handling of
3507 -fdump-ada-spec*.
3508
7bd765d4 35092012-09-30 Sharad Singhai <singhai@google.com>
3510
3511 * c-decl.c (c_write_global_declarations): Use a different method
3512 to determine if the dump has ben initialized.
3513
c4b1a13a 35142012-09-14 Joseph Myers <joseph@codesourcery.com>
3515
3516 PR c/54552
3517 * c-typeck.c (c_cast_expr): When casting to a type requiring
3518 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3519 c_fully_fold first.
3520
bb554051 35212012-09-14 Joseph Myers <joseph@codesourcery.com>
3522
3523 PR c/54103
3524 * c-typeck.c (build_unary_op): Pass original argument of
3525 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3526 any C_MAYBE_CONST_EXPR, if it has integer operands.
3527 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3528 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3529 to c_objc_common_truthvalue_conversion, then remove any
3530 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3531 c_objc_common_truthvalue_conversion not
3532 c_common_truthvalue_conversion.
3533 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3534 call note_integer_operands for arguments with integer operands
3535 that are not integer constants.
3536
c708c6ef 35372012-09-13 Jakub Jelinek <jakub@redhat.com>
3538
3539 PR c/54559
3540 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3541 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3542
cce20430 35432012-08-31 Jakub Jelinek <jakub@redhat.com>
3544
3545 PR c/54428
3546 * c-convert.c (convert): Don't call fold_convert_loc if
3547 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3548 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3549 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3550
a90d57ed 35512012-08-24 Jakub Jelinek <jakub@redhat.com>
3552
3553 PR c/54355
3554 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3555 for nested and empty_ok arguments in the call to
3556 c_parser_declaration_or_fndef.
3557
f003f5dc 35582012-08-17 Jakub Jelinek <jakub@redhat.com>
3559
3560 * c-tree.h (c_last_sizeof_arg): Declare.
3561 * c-parser.c (struct c_tree_loc_pair): New type.
3562 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3563 non-NULL.
3564 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3565 (c_parser_postfix_expression_after_primary): Likewise. Call
3566 sizeof_pointer_memaccess_warning if needed.
3567 (sizeof_ptr_memacc_comptypes): New function.
3568 * c-typeck.c (c_last_sizeof_arg): New global variable.
3569 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3570
a5656b73 35712012-07-24 Uros Bizjak <ubizjak@gmail.com>
3572
3573 * c-lang.h (lang_decl): Add variable_size GTY option.
3574
b9ed1410 35752012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3576
3577 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3578 * Make-lang.in: Fix dependencies.
3579
e53d55e7 35802012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3581
3582 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3583 and add language Makefile hooks.
3584 * config-lang.in: New file.
3585 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3586 add the required "normal" config-lang.in rules.
3587 * c-lang.h: Moved from gcc/ to here.
3588 * c-tree.h: Likewise.
3589 * c-objc-common.c: Likewise.
3590 * c-objc-common.h: Likewise.
3591 * c-typeck.c: Likewise.
3592 * c-convert.c: Likewise.
3593 * c-lang.c: Likewise.
3594 * c-aux-info.c: Likewise.
3595 * c-errors.c: Likewise.
3596 * gccspec.c: Likewise.
3597 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3598 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3599\f
f1717362 3600Copyright (C) 2012-2016 Free Software Foundation, Inc.
e53d55e7 3601
3602Copying and distribution of this file, with or without modification,
3603are permitted in any medium without royalty provided the copyright
3604notice and this notice are preserved.