]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
09172322 12015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2
3 PR fortran/44054
4 * c-objc-common.c (c_tree_printer): Replace locus pointer with
5 accessor function.
6
aac24642 72015-05-14 Marek Polacek <polacek@redhat.com>
8
9 PR c/66066
10 PR c/66127
11 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
12 rather than with 0.
13
e5f01cba 142015-05-12 David Malcolm <dmalcolm@redhat.com>
15
16 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
17 to add a call to warn_for_misleading_indentation.
18 (c_parser_else_body): Likewise, adding param "else_loc".
19 (c_parser_if_statement): Check for misleading indentation.
20 (c_parser_while_statement): Likewise.
21 (c_parser_for_statement): Likewise.
22
dc5945dc 232015-05-08 Marek Polacek <polacek@redhat.com>
24
25 PR c/64918
26 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
27 (output_init_element): Likewise.
28
cdc64059 292015-05-07 Marek Polacek <polacek@redhat.com>
30
31 PR c/65179
32 * c-typeck.c (build_binary_op): Warn when left shifting a negative
33 value.
34
6fa7118e 352015-04-30 Marek Polacek <polacek@redhat.com>
36
37 * c-typeck.c (set_init_label): Call error_at instead of error and
38 pass LOC to it.
39
98f44804 40 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
41 the type of a decl.
42
2cd7caae 43 * c-typeck.c (c_build_va_arg): Clarify the error message.
44
95cfd391 452015-04-29 Thomas Schwinge <thomas@codesourcery.com>
46
47 * c-parser.c (c_parser_oacc_enter_exit_data): Use
48 OMP_STANDALONE_CLAUSES.
49
e65e39f8 502015-04-28 Marek Polacek <polacek@redhat.com>
51
52 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
53
5580bf42 542015-04-28 Marek Polacek <polacek@redhat.com>
55
56 PR c/65901
57 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
58
c3468fc2 592015-04-25 Marek Polacek <polacek@redhat.com>
60
61 PR c/52085
62 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
63 attribute.
64
0cd6b1b4 652015-04-23 Marek Polacek <polacek@redhat.com>
66
67 PR c/65345
68 * c-decl.c (set_labels_context_r): New function.
69 (store_parm_decls): Call it via walk_tree_without_duplicates.
70 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
71 instead of create_tmp_var. Build TARGET_EXPR instead of
72 COMPOUND_EXPR.
73 (build_atomic_assign): Use create_tmp_var_raw instead of
74 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
75
05a827ce 762015-04-20 Ilya Verbin <ilya.verbin@intel.com>
77
78 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
79 (c_parser_omp_target_update): Add missed %> to error_at ().
80
de801c28 812015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
82
83 PR target/55143
84 * c-decl.c (c_default_pointer_mode): Remove definition.
85 * c-tree.h (c_default_pointer_mode): Remove declaration.
86
c3b1dca4 872015-03-27 Tobias Burnus <burnus@net-b.de>
88
89 PR c/65586
90 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
91 error out.
92 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
93 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
94 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
95
1443772f 962015-03-19 Jakub Jelinek <jakub@redhat.com>
97
98 * c-decl.c (c_decl_attributes): Also add "omp declare target"
99 attribute for DECL_EXTERNAL VAR_DECLs.
100
76738f56 1012015-03-11 Jakub Jelinek <jakub@redhat.com>
102
103 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
104 argument.
105
16f958b3 1062015-03-10 Jakub Jelinek <jakub@redhat.com>
107
108 PR c/65120
109 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
110 before preparing arguments to warn_logical_not_parentheses.
111
6054103a 1122015-03-09 Jakub Jelinek <jakub@redhat.com>
113
114 PR c/65120
115 * c-typeck.c (parser_build_binary_op): Don't warn for
116 !!x == y or !b == y where b is _Bool.
117
de3a1e03 1182015-03-09 Marek Polacek <polacek@redhat.com>
119
120 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
121 * c-decl.c (grokdeclarator): Likewise.
122 * c-typeck.c (build_binary_op): Likewise.
123
084e6bf0 1242015-02-27 Marek Polacek <polacek@redhat.com>
125
126 PR c/65228
127 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
128
4d7c4134 1292015-02-14 Marek Polacek <polacek@redhat.com>
130
131 PR c/64768
132 * c-decl.c (grokdeclarator): Set the range of a flexible array member
133 declared through a typedef name.
134
b1380826 1352015-02-13 Marek Polacek <polacek@redhat.com>
136
137 PR c/65050
138 * c-decl.c (grokdeclarator): Print also the type when giving
139 the error message about array's incomplete element type.
140
35ff54b5 1412015-02-11 Jakub Jelinek <jakub@redhat.com>
142
143 PR c/64824
144 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
145 check in the POP macro.
146
46861609 1472015-02-09 Marek Polacek <polacek@redhat.com>
148
149 PR c/64856
150 * c-typeck.c (process_init_element): Don't always wrap
151 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
152 initializing a range of elements.
153
bbf8fbec 1542015-02-04 Jakub Jelinek <jakub@redhat.com>
155
156 PR c/64824
157 PR c/64868
158 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
159
46861609 1602015-02-02 Bruno Loff <bruno.loff@gmail.com>
1f0ce3ac 161
162 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
163 processing enum declaration.
164
70279be9 1652015-01-29 Marek Polacek <polacek@redhat.com>
166
167 PR c/64709
168 * c-typeck.c (pop_init_level): If constructor_elements has
169 exactly one element with integer_zerop value, set constructor_zeroinit
170 to 1. Remove braces around warning_init call.
171
591970b4 1722015-01-27 Jakub Jelinek <jakub@redhat.com>
173
174 PR c/64766
175 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
176 of FUNCTION_DECLs with error_mark_node.
177
87778dc4 1782015-01-26 Jakub Jelinek <jakub@redhat.com>
179
180 PR c/64778
181 * c-typeck.c (convert_arguments): Return -1 if there are
182 error_args, even if we've diagnosed too many arguments.
183
cffdfb3d 1842015-01-21 Richard Biener <rguenther@suse.de>
185
186 PR middle-end/64313
187 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
188 for builtins the user declared correctly.
189
ca4c3545 1902015-01-15 Thomas Schwinge <thomas@codesourcery.com>
191 Bernd Schmidt <bernds@codesourcery.com>
192 Cesar Philippidis <cesar@codesourcery.com>
193 James Norris <jnorris@codesourcery.com>
194 Jakub Jelinek <jakub@redhat.com>
195 Ilmir Usmanov <i.usmanov@samsung.com>
196
197 * c-parser.c: Include "gomp-constants.h".
198 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
199 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
200 Use OMP_CLAUSE_SET_MAP_KIND.
201 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
202 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
203 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
204 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
205 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
206 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
207 "copyout", "create", "delete", "deviceptr", "gang", "host",
208 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
209 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
210 "present_or_create", "pcreate", "seq", "self", "vector",
211 "vector_length", "wait", "worker".
212 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
213 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
214 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
215 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
216 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
217 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
218 (c_parser_oacc_data_clause_deviceptr)
219 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
220 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
221 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
222 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
223 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
224 (c_parser_oacc_parallel, c_parser_oacc_update)
225 (c_parser_oacc_wait): New functions.
226 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
227 (c_finish_oacc_data): New prototypes.
228 * c-typeck.c: Include "gomp-constants.h".
229 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
230 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
231 OMP_CLAUSE_SET_MAP_KIND.
232 (c_finish_oacc_parallel, c_finish_oacc_kernels)
233 (c_finish_oacc_data): New functions.
234 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
235 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
236 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
237 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
238 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
239 GOMP_MAP_FORCE_DEVICEPTR.
240
1f78217c 2412015-01-09 Michael Collison <michael.collison@linaro.org>
242
243 * c-array-notation.c: Include hash-set.h, machmode.h,
244 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
245 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
246 * c-aux-info.c: Ditto.
247 * c-convert.c: Ditto.
248 * c-decl.c: Ditto.
249 * c-errors.c: Ditto.
250 * c-lang.c: Dittoxs.
251 * c-objc-common.c: Ditto.
252 * c-parser.c: Ditto.
253 * c-typeck.c: Include hash-set.h, machmode.h,
254 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
255 fold-const.h, wide-int.h, inchash.h, real.h and
256 fixed-value.h due to flattening of tree.h.
257
15e18a8c 2582015-01-07 Marek Polacek <polacek@redhat.com>
259
260 PR c/64417
261 * c-typeck.c (process_init_element): Disallow initialization of
262 a flexible array member with a string constant if the structure
263 is in an array.
264
d353bf18 2652015-01-05 Jakub Jelinek <jakub@redhat.com>
266
823a9dd4 267 PR sanitizer/64344
268 * c-typeck.c (convert_for_assignment, c_finish_return): For
269 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
270 types also set in_late_binary_op around convert call.
271 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
272 to integral type casts, if not in_late_binary_op, pass c_fully_fold
273 result on expr as last argument to ubsan_instrument_float_cast,
274 if in_late_binary_op, don't use c_save_expr but save_expr.
275
d353bf18 276 Update copyright years.
277
92b63884 2782015-01-05 Marek Polacek <polacek@redhat.com>
279
280 PR c/64423
281 * c-typeck.c (build_array_ref): Pass loc down to
282 warn_array_subscript_with_type_char.
283
8a8211df 2842014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
285
286 * c-typeck.c: New behavious for pointers to arrays with qualifiers
287 (common-pointer-type): For pointers to arrays take qualifiers from
288 element type.
289 (build_conditional_expr): Add warnings for lost qualifiers.
290 (comp-target-types): Allow pointers to arrays with different qualifiers.
291 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
292 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
293 to PEDWARN_FOR_QUALIFIERS.
294
35ea0139 2952014-12-17 Jakub Jelinek <jakub@redhat.com>
296
297 PR sanitizer/64289
298 * c-convert.c: Include ubsan.h.
299 (convert): For real -> integral casts and
300 -fsanitize=float-cast-overflow don't call convert_to_integer, but
301 instead instrument the float cast directly.
302
f9e245b2 3032014-11-29 Jakub Jelinek <jakub@redhat.com>
304
305 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
306 c_finish_stmt_expr): Remove NULL last argument from
307 create_tmp_var_raw and create_tmp_var calls.
308 * c-array-notation.c (fix_builtin_array_notation_fn,
309 build_array_notation_expr, fix_conditional_array_notations_1,
310 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
311
fce2dbd1 3122014-11-28 Marek Polacek <polacek@redhat.com>
313
314 PR c/63862
315 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
316 convert the right operand to integer type.
317
396c36b7 3182014-11-25 Marek Polacek <polacek@redhat.com>
319
320 PR c/63877
321 * c-decl.c (start_function): Disable -Wmissing-declarations warning
322 for inline functions.
323
c61ef207 3242014-11-21 Jakub Jelinek <jakub@redhat.com>
325
326 PR target/63764
327 * c-typeck.c (build_array_ref): Adjust
328 convert_vector_to_pointer_for_subscript caller. If it returns true,
329 call non_lvalue_loc on the result.
330
565353e8 3312014-11-11 Richard Biener <rguenther@suse.de>
332
333 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
334 to true.
335
fdd735a7 3362014-11-10 Andi Kleen <ak@linux.intel.com>
337
338 PR c/60804
339 * c-parser.c (c_parser_statement_after_labels): Call
340 check_no_cilk.
341 (c_parser_if_statement): Dito.
342 (c_parser_switch_statement): Dito.
343 (c_parser_while_statement): Dito.
344 (c_parser_do_statement): Dito.
345 (c_parser_for_statement): Dito.
346 * c-typeck.c (c_finish_loop): Dito.
347
0feb4de1 3482014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
349
350 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
351 OPT_Wshift_count_overflow in the warnings.
352
a3fec48a 3532014-10-30 Marek Polacek <polacek@redhat.com>
354
355 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
356 print the stripped version as well, if they're not the same.
357
3754d046 3582014-10-29 Richard Sandiford <richard.sandiford@arm.com>
359
360 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
361 machine_mode.
362
1140c305 3632014-10-28 Andrew MacLeod <amacleod@redhat.com>
364
365 * c-decl.c: Adjust include files.
366 * c-parser.c: Ditto.
367
ab103e33 3682014-10-27 Phil Muldoon <pmuldoon@redhat.com>
369 Tom Tromey <tromey@redhat.com>
370
371 * c-tree.h (enum c_oracle_request): New.
372 (c_binding_oracle_function): New typedef.
373 (c_binding_oracle, c_pushtag, c_bind): Declare.
374 * c-decl.c (c_binding_oracle): New global.
375 (I_SYMBOL_CHECKED): New macro.
376 (i_symbol_binding): New function.
377 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
378 (I_TAG_CHECKED): New macro.
379 (i_tag_binding): New function.
380 (I_TAG_BINDING, I_TAG_DECL): Redefine.
381 (I_LABEL_CHECKED): New macro.
382 (i_label_binding): New function.
383 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
384 (c_print_identifier): Save and restore c_binding_oracle.
385 (c_pushtag, c_bind): New functions.
386
94ea8568 3872014-10-27 Andrew MacLeod <amacleod@redhat.com>
388
389 * c-typeck.c: Adjust include files.
390
32ecf960 3912014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
392
393 PR c++/53061
394 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
395 initialization here...
396 (c_initialize_diagnostics): ... but here. Set defaults after
397 building pretty-printer.
398
2981340f 3992014-10-23 Marek Polacek <polacek@redhat.com>
400
401 PR c/63626
402 * c-decl.c (pop_scope): Don't print warning in external_scope.
403
d303aeaf 4042014-10-19 Marek Polacek <polacek@redhat.com>
405
406 PR c/63567
407 * c-typeck.c (output_init_element): Allow initializing objects with
408 static storage duration with compound literals even in C99 and add
409 pedwarn for it.
410
bccf97da 4112014-10-17 Marek Polacek <polacek@redhat.com>
412
413 PR c/63567
414 * c-typeck.c (digest_init): Allow initializing objects with static
415 storage duration with compound literals even in C99 and add pedwarn
416 for it.
417
d9c77450 4182014-10-17 Marek Polacek <polacek@redhat.com>
419
420 PR c/63543
421 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
422 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
423 error multiple times. Print the type.
424
a2bbd0a7 4252014-10-17 Marek Polacek <polacek@redhat.com>
426
427 PR c/63549
428 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
429 type.
430
e610d2b2 4312014-10-17 Marek Polacek <polacek@redhat.com>
432
433 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
434 (start_function): Use OPT_Wimplicit_int instead of 0.
435 (store_parm_decls_oldstyle): Likewise.
436
6b6e56b6 4372014-10-17 Alan Modra <amodra@gmail.com>
438
439 PR middle-end/61848
440 * c-decl.c (merge_decls): Don't merge section name or tls model
441 to newdecl symtab node, instead merge to olddecl. Override
442 existing olddecl section name. Set tls_model for all thread-local
443 vars, not just OMP thread-private ones. Remove incorrect comment.
444
a3020f2f 4452014-10-16 Andrew MacLeod <amacleod@redhat.com>
446
447 * c-decl.c: Adjust include files.
448
9f75f026 4492014-10-14 DJ Delorie <dj@redhat.com>
450
451 * c-parser.c (c_parse_init): Add RID entries for each __intN.
452 (c_token_starts_typename): Check all __intN, not just __int128.
453 (c_token_starts_declspecs): Likewise.
454 (c_parser_declspecs): Likewise.
455 (c_parser_attribute_any_word): Likewise.
456 (c_parser_objc_selector): Likewise.
457 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
458 (struct c_declspecs): Add int_n_idx field to record *which* __intN
459 is specified.
460 * c-decl.c (declspecs_add_type): Check for all __intN, not just
461 __int128.
462 (finish_declspecs): Likewise.
463
4f284d4a 4642014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
465
466 * c-parser.c (c_parser_all_labels): New function to replace
467 the duplicate code.
468 (c_parser_statement): Call the new function.
469
61a892dc 4702014-10-09 Marek Polacek <polacek@redhat.com>
471
472 PR c/63480
473 * c-typeck.c (pop_init_level): Don't warn about initializing
474 with { }.
475
4e888fd9 4762014-10-07 Marek Polacek <polacek@redhat.com>
477
478 PR c/59717
479 * c-decl.c (header_for_builtin_fn): New function.
480 (implicitly_declare): Suggest which header to include.
481
224bdd51 4822014-10-07 Marek Polacek <polacek@redhat.com>
483
484 * c-convert.c (convert): Use error_operand_p.
485 * c-typeck.c (require_complete_type): Likewise.
486 (really_atomic_lvalue): Likewise.
487 (digest_init): Likewise.
488 (handle_omp_array_sections_1): Likewise.
489
a2bc79db 4902014-10-03 Marek Polacek <polacek@redhat.com>
491
492 PR c/63453
493 * c-decl.c (pop_scope): Don't warn about "inline function declared
494 but never defined" for functions marked with gnu_inline attribute.
495
4fc4088b 4962014-09-25 Jakub Jelinek <jakub@redhat.com>
497
498 PR c++/63249
499 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
500 on low_bound and length.
501
5213d6c9 5022014-09-24 Marek Polacek <polacek@redhat.com>
503
504 PR c/61405
505 PR c/53874
506 * c-parser.c: Don't define CPP_KEYWORD.
507 (c_parser_switch_statement): Pass original type to c_finish_case.
508 * c-tree.h (c_finish_case): Update declaration.
509 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
510 conditionally to c_do_switch_warnings.
511
6ea2b1bc 5122014-09-03 Marek Polacek <polacek@redhat.com>
513
514 PR c/62024
515 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
516 conversions.
517
40750995 5182014-09-02 Jakub Jelinek <jakub@redhat.com>
519 Balaji V. Iyer <balaji.v.iyer@intel.com>
520 Igor Zamyatin <igor.zamyatin@intel.com>
521
522 * c-parser.c (c_parser_cilk_for): New function.
523 (c_parser_cilk_grainsize): Likewise.
524 (c_get_temp_regvar): Likewise.
525 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
526 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
527 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
528 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
529 case.
530
8c583613 5312014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
532
533 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
534 with using HOST_WIDE_INT without truncation to 'int'
535
dc6229e8 5362014-08-22 Marek Polacek <polacek@redhat.com>
537
538 PR c++/62199
539 * c-typeck.c (parser_build_binary_op): Adjust call to
540 warn_logical_not_parentheses.
541
5fdda74b 5422014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
543
544 PR other/62008
545 * c-parser.c (c_parser_array_notation): Check for correct
546 type of an array added.
547
78bf4156 5482014-08-19 Marek Polacek <polacek@redhat.com>
549
550 PR c++/62153
551 * c-typeck.c (build_binary_op): If either operand of a comparison
552 is a boolean expression, call maybe_warn_bool_compare.
553
005b8fe7 5542014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
555
556 PR c/45584
557 * c-typeck.c (build_c_cast): Do a conversion even when the
558 TYPE_MAIN_VARIANTs are the same.
559
508ea33a 5602014-08-19 Marek Polacek <polacek@redhat.com>
561
562 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
563 pedwarn_c99 instead of pedwarn.
564 (grokfield): Likewise.
565 (warn_defaults_to): New function.
566 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
567 Unconditionally call pedwarn_c99 instead of pedwarn.
568 (start_function): Call warn_defaults_to instead of pedwarn_c99.
569 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
570 check flag_isoc11 before.
571 * c-errors.c (pedwarn_c99): Change the return type to bool.
572 Handle -Wc99-c11-compat.
573 * c-parser.c (disable_extension_diagnostics): Handle
574 warn_c99_c11_compat.
575 (restore_extension_diagnostics): Likewise.
576 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
577 instead of pedwarn, don't check flag_isoc11 before.
578 (c_parser_declspecs): Likewise.
579 (c_parser_alignas_specifier): Likewise.
580 (c_parser_alignof_expression): Likewise.
581 (c_parser_generic_selection): Likewise.
582 * c-tree.h (pedwarn_c99): Update declaration.
583 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
584 of pedwarn_c99.
585
806fe15e 5862014-08-19 Marek Polacek <polacek@redhat.com>
587
588 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
589 to pedwarn_c90.
590 * c-errors.c: Include "opts.h".
591 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
592 * c-parser.c (disable_extension_diagnostics): Handle negative value
593 of warn_c90_c99_compat, too.
594 (restore_extension_diagnostics): Likewise.
595 (c_parser_compound_statement_nostart): Pass
596 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
597
89868e45 5982014-08-12 Marek Polacek <polacek@redhat.com>
599
600 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
601 Add pedwarn.
602 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
603 Likewise.
604 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
605
890c2e2f 6062014-08-10 Marek Polacek <polacek@redhat.com>
607
608 PR c/51849
609 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
610 Call pedwarn_c90 instead of pedwarn.
611 (check_bitfield_type_and_width): Likewise.
612 (declspecs_add_qual): Likewise.
613 (declspecs_add_type): Likewise.
614 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
615 Adjust to only call pedwarn_c90.
616 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
617 pedwarn_c90 instead of pedwarn.
618 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
619 * c-parser.c (disable_extension_diagnostics): Handle
620 warn_c90_c99_compat.
621 (restore_extension_diagnostics): Likewise.
622 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
623 pedwarn_c90 instead of pedwarn.
624 (c_parser_initelt): Likewise.
625 (c_parser_postfix_expression): Likewise.
626 (c_parser_postfix_expression_after_paren_type): Likewise.
627 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
628 * c-tree.h: Fix formatting.
629 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
630 pedwarn_c90 instead of pedwarn.
631
7149db5f 6322014-08-07 Trevor Saunders <tsaunders@mozilla.com>
633
634 * c-typeck.c: Remove include of pointer-set.h.
635
1c75251e 6362014-08-07 Marek Polacek <polacek@redhat.com>
637
638 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
639
06ecf488 6402014-08-02 Trevor Saunders <tsaunders@mozilla.com>
641
642 * c-typeck.c: Use hash_map instead of pointer_map.
643
431205b7 6442014-08-02 Trevor Saunders <tsaunders@mozilla.com>
645
646 * c-decl.c: Use hash_set instead of pointer_set.
647
3394c80c 6482014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
649
650 PR middle-end/61455
651 * c-array-notation.c (expand_array_notations): Handling
652 of DECL_EXPR added.
653
f22a2cb7 6542014-07-31 Marc Glisse <marc.glisse@inria.fr>
655
656 PR c++/60517
657 * c-typeck.c (c_finish_return): Return 0 instead of the address of
658 a local variable.
659
74691f46 6602014-07-30 Tom Tromey <tromey@redhat.com>
661
662 * c-typeck.c (struct constructor_stack) <designator_depth>: New
663 field.
664 (really_start_incremental_init, push_init_level): Initialize
665 designator_depth.
666 (pop_init_level): Set global designator_depth.
667 (process_init_element): Check for designated_init attribute.
668
f9767fb6 6692014-07-20 Marek Polacek <polacek@redhat.com>
670
671 PR c/61852
672 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
673 (implicitly_declare): Pass location to implicit_decl_warning.
674
305d96bc 6752014-07-14 Jakub Jelinek <jakub@redhat.com>
676
677 PR middle-end/61294
678 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
679 If non-NULL, call c_parser_check_literal_zero.
680 (c_parser_check_literal_zero): New function.
681 (c_parser_postfix_expression_after_primary): Adjust
682 c_parser_expr_list caller, handle -Wmemset-transposed-args.
683
87d59e72 6842014-07-06 Marek Polacek <polacek@redhat.com>
685
686 PR c/6940
687 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
688 * c-tree.h (C_ARRAY_PARAMETER): Define.
689 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
690 function parameter.
691
752098c8 6922014-07-02 Jan Hubicka <hubicka@ucw.cz>
693 Chen Gang <gang.chen.5i5j@gmail.com>
694
695 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
696 releasing symbol.
697
1207866e 6982014-07-01 Marek Polacek <polacek@redhat.com>
699
700 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
701 instead of 0 to WARN_FOR_ASSIGNMENT.
702
7a6bbb76 7032014-07-01 Marek Polacek <polacek@redhat.com>
704
705 PR c/58286
706 * c-typeck.c (convert_for_assignment): Pass
707 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
708
70575064 7092014-06-30 Marek Polacek <polacek@redhat.com>
710
711 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
712 has no_sanitize_undefined attribute.
713
4879e4cf 7142014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
715
716 PR middle-end/57541
717 * c-array-notation.c (fix_builtin_array_notation_fn):
718 Check for 0 arguments in builtin call. Check that bultin argument is
719 correct.
720 * c-parser.c (c_parser_array_notation): Check for incorrect initial
721 index.
722
45c5b823 7232014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
724
725 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
726 qualifiers in __auto_type for atomic types.
727 (c_parser_typeof_specifier): Discard all type qualifiers in
728 __typeof__ for atomic types.
729
430b73ee 7302014-06-25 Marek Polacek <polacek@redhat.com>
731
732 PR c/61162
733 * c-parser.c (c_parser_statement_after_labels): Pass the location of
734 the return expression to c_finish_return.
735
9580cb79 7362014-06-25 Jakub Jelinek <jakub@redhat.com>
737
738 * c-typeck.c (c_finish_omp_clauses): Make sure
739 OMP_CLAUSE_LINEAR_STEP has correct type.
740
c1f445d2 7412014-06-24 Trevor Saunders <tsaunders@mozilla.com>
742
743 * c-decl.c: Adjust.
744
e471cc6f 7452014-06-24 Jakub Jelinek <jakub@redhat.com>
746
747 * c-parser.c (c_parser_omp_for_loop): For
748 #pragma omp parallel for simd move lastprivate clause from parallel
749 to for rather than simd.
750
499b7390 7512014-06-23 Marek Polacek <polacek@redhat.com>
752
753 * c-typeck.c (parser_build_binary_op): Don't call
754 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
755
5e68df57 7562014-06-15 Jan Hubicka <hubicka@ucw.cz>
757
758 * c-parser.c (c_parser_omp_threadprivate): Likewise.
759 * c-decl.c (merge_decls): Likewise.
760
064b0d02 7612014-06-09 Marek Polacek <polacek@redhat.com>
762
763 PR c/36446
764 * c-typeck.c (error_init): Call inform instead of error_at.
765 (pedwarn_init): Call inform instead of pedwarn.
766 (warning_init): Call inform instead of warning_at.
767
71e19e54 7682014-06-07 Jan Hubicka <hubicka@ucw.cz>
769
770 * c-decl.c (merge_decls): Use set_decl_section_name.
771 (duplicate_decls): Remove node if it exists.
772
95cdf3fd 7732014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
774
775 PR c/53119
776 * c-typeck.c (push_init_level, process_init_element,
777 pop_init_level): Correct check for zero initialization, move
778 missing brace warning to respect zero initialization.
779
a07f86a6 7802014-06-05 Marek Polacek <polacek@redhat.com>
781
782 PR c/56724
783 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
784
32dc1512 7852014-06-05 Marek Polacek <polacek@redhat.com>
786
787 PR c/49706
788 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
789 on the left hand side operand of a comparison.
790
64cf1262 7912014-06-05 Marek Polacek <polacek@redhat.com>
792
793 PR c/48062
794 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
795 Print note only if the warning was printed.
796
071f6d39 7972014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
798
799 PR c/58942
800 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
801 with a pointer.
802
c69ec07d 8032014-06-03 Marek Polacek <polacek@redhat.com>
804
805 PR c/60439
806 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
807 c_start_case.
808 * c-tree.h (c_start_case): Update.
809 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
810 switch condition has boolean value.
811
f7715905 8122014-06-02 Andrew MacLeod <amacleod@redhat.com>
813
814 * c-decl.c: Include builtins.h.
815 * c-parser.c: Likewise.
816
dcfff6f9 8172014-05-27 Marek Polacek <polacek@redhat.com>
818
819 PR c/56724
820 * c-typeck.c (convert_arguments): Get location of a parameter. Change
821 error and warning calls to error_at and warning_at. Pass location of
822 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
823 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
824 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
825
c048c42c 8262014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
827
828 PR c/61191
829 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
830 function parameters.
831
8c016392 8322014-05-23 Jan Hubicka <hubicka@ucw.cz>
833
834 * c-decl.c (merge_decls): Preserve symtab node pointers.
835 (duplicate_decls): Free new decl.
836
184a718f 8372014-05-23 Thomas Schwinge <thomas@codesourcery.com>
838
6ce915ef 839 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
840 initialization.
841
184a718f 842 * c-parser.c (c_parser_omp_target): Return bool values.
843
22ac3f78 8442014-05-22 Thomas Schwinge <thomas@codesourcery.com>
845
846 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
847 num_teams_loc variable to num_thread_limit_loc.
848
3ab4693e 8492014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
850
851 * c-array-notation.c (expand_array_notations): Use void_node
852 instead of void_zero_node.
853
25a27413 8542014-05-17 Trevor Saunders <tsaunders@mozilla.com>
855
856 * c-decl.c (finish_struct): Adjust.
857 (finish_enum): Likewise.
858 (bind): Adjust.
859 (record_inline_static): Likewise.
860 (push_scope): Likewise.
861 (make_label): Likewise.
862 (lookup_label_for_goto): Likewise.
863 (finish_struct): Likewise.
864 (finish_enum): Likewise.
865 (store_parm_decls): Likewise.
866 (c_push_function_context): Likewise.
867 * c-lang.h: Remove usage of variable_size gty attribute.
868 * c-parser.c (c_parse_init): Adjust.
869 (c_parse_file): Likewise.
870
172b8440 8712014-05-13 Marek Polacek <polacek@redhat.com>
872
873 PR c/61162
874 * c-typeck.c (convert_for_assignment): Pass location to
875 WARN_FOR_ASSIGNMENT instead of input_location.
876
c9e51d25 8772014-05-10 Marek Polacek <polacek@redhat.com>
878
879 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
880 maybe_warn_string_init.
881 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
882 maybe_warn_string_init.
883 * c-tree.h (maybe_warn_string_init): Update declaration.
884 * c-typeck.c (maybe_warn_string_init): Add location parameter.
885 Call pedwarn_init with loc instead of with input_location.
886 (digest_init): Pass init_loc to maybe_warn_string_init.
887 (pop_init_level): Call pedwarn_init with loc instead of with
888 input_location.
889 (set_init_index): Likewise.
890 (process_init_element): Likewise.
891
53de1631 8922014-05-09 Marek Polacek <polacek@redhat.com>
893
894 PR c/61096
895 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
896 (c_parser_initelt): Pass location to set_init_label. Pass array index
897 location to set_init_index.
898 * c-tree.h (push_init_level): Update declaration.
899 (pop_init_level): Likewise.
900 (set_init_index): Likewise.
901 (set_init_label): Likewise.
902 * c-typeck.c (error_init): Add location parameter. Call error_at
903 instead of error.
904 (digest_init): Pass init_loc to error_init.
905 (really_start_incremental_init):
906 (push_init_level): Add location parameter. Pass loc to pop_init_level
907 and error_init.
908 (pop_init_level): Likewise.
909 (set_designator): Add location parameter. Pass loc to pop_init_level,
910 push_init_level, and error_init.
911 (set_init_index): Add location parameter. Pass loc to error_init and
912 set_designator.
913 (set_init_label): Likewise.
914 (output_init_element): Pass loc to error_init.
915 (process_init_element): Pass loc to error_init, pop_init_level,
916 pedwarn_init, and push_init_level.
917
3e5a8b00 9182014-05-09 Marek Polacek <polacek@redhat.com>
919
920 PR c/50459
921 * c-parser.c (c_parser_attributes): Parse the arguments as an
922 expression-list if the attribute takes identifier.
923
c2c4ae8d 9242014-05-08 Marek Polacek <polacek@redhat.com>
925
926 PR c/61053
927 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
928 TYPE_ALIGN_UNIT.
929
2026249a 9302014-05-08 Marek Polacek <polacek@redhat.com>
931
932 PR c/61077
933 * c-decl.c (start_function): Warn for _Atomic-qualified return type
934 of main.
935
960d5a55 9362014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
937 Mike Stump <mikestump@comcast.net>
938 Richard Sandiford <rdsandiford@googlemail.com>
939
940 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
941 (finish_enum): Use wide-int interfaces.
942 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
943 * c-typeck.c (build_c_cast): Likewise.
944 (set_nonincremental_init_from_string): Likewise.
945 (c_tree_equal): Likewise.
946
e0e14cbd 9472014-05-02 Marek Polacek <polacek@redhat.com>
948
949 PR c/25801
950 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
951 Return size_one_node when the type is not complete.
952 (pointer_diff): Remove comment.
953 (build_unary_op): Improve error messages.
954
27ff10cb 9552014-05-02 Marek Polacek <polacek@redhat.com>
956
957 * c-typeck.c (c_finish_return): Separate warning_at calls.
958
68410ce9 9592014-05-02 Marek Polacek <polacek@redhat.com>
960
961 * c-tree.h (error_init): Remove declaration.
962 (pedwarn_init): Likewise.
963 * c-typeck.c (error_init): Make static and move above.
964 (pedwarn_init): Likewise.
965 (warning_init): Move above.
966 (maybe_warn_string_init): Likewise.
967
e8e27117 9682014-05-01 Jeff Law <law@redhat.com>
969
970 Revert:
971
972 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
973 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
974 avoid goto.
975
971df357 9762014-05-02 Marek Polacek <polacek@redhat.com>
977
978 PR c/60784
979 * c-typeck.c (push_init_level): Set constructor_designated to
980 p->designated for structures.
981
de548fe5 9822014-05-01 Marek Polacek <polacek@redhat.com>
983
984 PR c/60915
985 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
986 function-definition has an attribute after the declarator.
987
053a0ded 9882014-05-01 Marek Polacek <polacek@redhat.com>
989
990 PR c/60257
991 * c-typeck.c (warning_init): Add location_t parameter. Call
992 warning_at instead of warning.
993 (push_init_level): Pass input_location to warning_init.
994 (add_pending_init): Add location_t parameter. Pass loc to
995 warning_init.
996 (set_nonincremental_init): Pass input_location to add_pending_init.
997 (set_nonincremental_init_from_string): Likewise.
998 (output_init_element): Pass loc to warning_init and to
999 add_pending_init.
1000
694296f2 10012014-05-01 Marek Polacek <polacek@redhat.com>
1002
1003 PR c/43395
1004 * c-typeck.c (c_finish_return): Distinguish between label and variable
1005 when warning about returning local address.
1006
86bbd7f9 10072014-05-01 Marek Polacek <polacek@redhat.com>
1008
1009 PR c/29467
1010 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1011 in C89 mode.
1012
e4ab2ef3 10132014-05-01 Marek Polacek <polacek@redhat.com>
1014
1015 PR c/43245
1016 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1017 instead of 0 to WARN_FOR_QUALIFIERS.
1018
ca3999cb 10192014-05-01 Marek Polacek <polacek@redhat.com>
1020
1021 PR c/56989
1022 * c-typeck.c (default_conversion): Use better location for
1023 error call.
1024
52cc0072 10252014-04-30 Marek Polacek <polacek@redhat.com>
1026
1027 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1028 also when SANITIZE_FLOAT_DIVIDE is on.
1029
af379dd3 10302014-04-30 Marek Polacek <polacek@redhat.com>
1031
1032 PR c/60139
1033 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1034 and pedwarn_init. Use loc insted of input_location.
1035
b069c2a0 10362014-04-30 Marek Polacek <polacek@redhat.com>
1037
1038 PR c/60351
1039 * c-typeck.c (build_binary_op): Use location when warning about
1040 shift count.
1041
4a026b48 10422014-04-25 Marek Polacek <polacek@redhat.com>
1043
1044 PR c/18079
1045 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1046 always_inline/noinline and hot/cold attributes.
1047
adc93f31 10482014-04-25 Marek Polacek <polacek@redhat.com>
1049
1050 PR c/60114
1051 * c-parser.c (c_parser_initelt): Pass input_location to
1052 process_init_element.
1053 (c_parser_initval): Pass loc to process_init_element.
1054 * c-tree.h (process_init_element): Adjust declaration.
1055 * c-typeck.c (push_init_level): Pass input_location to
1056 process_init_element.
1057 (pop_init_level): Likewise.
1058 (set_designator): Likewise.
1059 (output_init_element): Add location_t parameter. Pass loc to
1060 digest_init.
1061 (output_pending_init_elements): Pass input_location to
1062 output_init_element.
1063 (process_init_element): Add location_t parameter. Pass loc to
1064 output_init_element.
1065
e1029911 10662014-04-24 Jakub Jelinek <jakub@redhat.com>
1067
1068 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1069 atomic-clause, allow comma in between atomic-clause and
1070 seq_cst.
1071
9f0a7bc6 10722014-04-22 Jakub Jelinek <jakub@redhat.com>
1073
1074 PR c/59073
1075 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1076 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1077
094da06d 10782014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1079
1080 PR middle-end/60469
1081 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1082 create_tmp_var instead build_decl for creating temps.
1083 (build_array_notation_expr): Likewise.
1084 (fix_conditional_array_notations_1): Likewise.
1085 (fix_array_notation_expr): Likewise.
1086 (fix_array_notation_call_expr): Likewise.
1087
5a672e62 10882014-03-28 Jakub Jelinek <jakub@redhat.com>
1089
1090 PR c++/60689
1091 * c-tree.h (c_build_function_call_vec): New prototype.
1092 * c-typeck.c (build_function_call_vec): Don't call
1093 resolve_overloaded_builtin here.
1094 (c_build_function_call_vec): New wrapper function around
1095 build_function_call_vec. Call resolve_overloaded_builtin here.
1096 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1097 Call c_build_function_call_vec instead of build_function_call_vec.
1098 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1099 * c-decl.c (finish_decl): Likewise.
1100
f40f5e0e 11012014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1102
1103 PR c/55383
1104 * c-typeck.c: Use correct format string in cast-qual warning
1105
9ec099a3 11062014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1107
1108 * c-decl.c (c_decl_attributes): Use
1109 lang_hooks.types.omp_mappable_type.
1110 * c-typeck.c (c_finish_omp_clauses): Likewise.
1111
3bfdc94f 11122014-03-06 Marek Polacek <polacek@redhat.com>
1113
1114 PR c/60197
1115 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1116 of checking tree code.
1117
8f1128f8 11182014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1119
1120 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1121 (c_parser_parameter_declaration): Likewise.
1122
977b1853 11232014-02-19 Marek Polacek <polacek@redhat.com>
1124
1125 PR c/60195
1126 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1127 Call mark_exp_read on exp.value.
1128 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1129 TREE_ADDRESSABLE on old instead of val.
1130 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1131
825cd6ef 11322014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1133
1134 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1135 C_EXPR_APPEND by vec_safe_push.
1136 * c-tree.h (C_EXPR_APPEND): Remove.
1137
ec761d5a 11382014-01-31 Marek Polacek <polacek@redhat.com>
1139
1140 PR c/59963
1141 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1142 build_function_call_vec.
1143 (build_function_call): Likewise.
1144 (build_atomic_assign): Likewise.
1145 (build_function_call_vec): Add arg_loc parameter. Use it.
1146 (convert_arguments): Likewise.
1147 (convert_for_assignment): Rename rhs_loc to expr_loc.
1148 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1149 (c_parser_objc_keywordexpr): Likewise.
1150 (c_parser_postfix_expression_after_primary): Call
1151 build_function_call_vec with expr_loc rather than op_loc.
1152 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1153 build_function_call_vec.
1154 (c_parser_expr_list): Add locations parameter. Fill it with locations
1155 of function arguments.
1156 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1157
22a75734 11582014-01-30 Marek Polacek <polacek@redhat.com>
1159
1160 PR c/59940
1161 * c-typeck.c (build_function_call_vec): Use loc parameter.
1162 (convert_arguments): Add location parameter. Use it.
1163 (ep_convert_and_check): Likewise.
1164 (build_atomic_assign): Adjust convert_for_assignment call.
1165 (build_modify_expr): Likewise.
1166 (digest_init): Likewise.
1167 (c_finish_return): Likewise.
1168 (build_conditional_expr): Adjust ep_convert_and_check calls.
1169 (convert_for_assignment): Add rhs_loc parameter. Use it.
1170 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1171 calls.
1172
29f580ac 11732014-01-30 Richard Biener <rguenther@suse.de>
1174
1175 PR c/59905
1176 * c-typeck.c (build_function_call_vec): Do not replace calls
1177 to a function via an incompatible type with a runtime abort.
1178
a89e6c15 11792014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1180
1181 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1182 flag_enable_cilkplus with flag_cilkplus.
1183 (c_parser_direct_declarator_inner): Likewise.
1184 (c_parser_attribute_any_word): Likewise.
1185 (c_parser_attributes): Likewise.
1186 (c_parser_compound_statement): Likewise.
1187 (c_parser_statement_after_labels): Likewise.
1188 (c_parser_if_statement): Likewise.
1189 (c_parser_switch_statement): Likewise.
1190 (c_parser_do_statement): Likewise.
1191 (c_parser_for_statement): Likewise.
1192 (c_parser_unary_expression): Likewise.
1193 (c_parser_postfix_expression): Likewise.
1194 (c_parser_postfix_expression_after_primary): Likewise.
1195 (c_parser_postfix_expression_after_primary): Likewise.
1196 (c_parser_omp_clause_name): Likewise.
1197 (c_finish_omp_declare_simd): Likewise.
1198 (c_parser_cilk_verify_simd): Likewise.
1199 * c-typeck.c (build_array_ref): Likewise.
1200 (build_function_call_vec): Likewise.
1201 (convert_arguments): Likewise.
1202 (build_compound_expr): Likewise.
1203 (c_finish_return): Likewise.
1204 (c_finish_if_stmt): Likewise.
1205 (c_finish_loop): Likewise.
1206 (build_binary_op): Likewise.
1207
2623625f 12082014-01-23 Marek Polacek <polacek@redhat.com>
1209
1210 PR c/59846
1211 * c-typeck.c (parser_build_binary_op): Use location instead of
1212 input_location.
1213 (build_binary_op): Pass location to shorten_compare.
1214
46da3601 12152014-01-23 Marek Polacek <polacek@redhat.com>
1216
1217 PR c/58346
1218 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1219 an empty aggregate.
1220
9a9db3c1 12212014-01-23 Marek Polacek <polacek@redhat.com>
1222
1223 PR c/59871
1224 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1225 of a comma expression.
1226 (emit_side_effect_warnings): Likewise.
1227
69c9b607 12282014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1229
1230 PR c/59825
1231 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1232 function to use walk_tree and moved a lot of its functionality to
1233 expand_array_notations.
1234 (expand_array_notations): New function.
1235
7e005ab5 12362014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1237
1238 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1239 attribute an attribute without value.
1240
d6779b5f 12412014-01-23 Jakub Jelinek <jakub@redhat.com>
1242
1243 PR middle-end/58809
1244 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1245 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1246
ec431042 12472014-01-22 Marek Polacek <polacek@redhat.com>
1248
1249 PR c/59891
1250 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1251 of remove_c_maybe_const_expr on op1 and op2.
1252
1248c663 12532014-01-15 Jakub Jelinek <jakub@redhat.com>
1254
1255 PR c/58943
1256 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1257 effects, preevaluate rhs using SAVE_EXPR first.
1258
0bc789fc 12592014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1260
1261 PR c++/59631
1262 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1263 statements with if-elseif statements.
1264
6685d11c 12652014-01-06 Marek Polacek <polacek@redhat.com>
1266
1267 PR c/57773
1268 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1269 defined bit-field types only in ISO C.
1270
3aea1f79 12712014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1272
1273 Update copyright years
1274
e4f22041 12752014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1276
1277 * c-array-notation.c: Use the standard form for the copyright notice.
1278
74acc703 12792013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1280
1281 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1282 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1283 field in parser is not empty. If not-empty, call the function
1284 c_parser_finish_omp_declare_simd.
1285 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1286 between SIMD-enabled functions and #pragma simd. Added new parameter.
1287 (c_parser_cilk_all_clauses): Modified the usage of the function
1288 c_parser_cilk_clause_vectorlength as mentioned above.
1289 (c_parser_cilk_simd_fn_vector_attrs): New function.
1290 (c_finish_cilk_simd_fn_tokens): Likewise.
1291 (is_cilkplus_vector_p): Likewise.
1292 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1293 "nomask," and "mask" strings in clause name.
1294 (c_parser_omp_all_clauses): Added 3 new case statements:
1295 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1296 PRAGMA_CILK_CLAUSE_NOMASK.
1297 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1298 check for vector attribute and if so call the function
1299 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1300 called the function c_finish_cilk_simd_fn_tokens.
1301 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1302 parser field is non-empty. If so, parse them as you would parse
1303 the omp declare simd pragma.
1304 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1305 Added a check when step is a parameter and flag it as error.
1306 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1307 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1308 pragma_omp_clause.
1309
395dc01c 13102013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1311
1312 * c-parser.c (c_parser_omp_parallel): Fix description.
1313
433e804e 13142013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1315
1316 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1317 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1318 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1319 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1320
a179a7dc 13212013-12-04 Joseph Myers <joseph@codesourcery.com>
1322
1323 PR c/52023
1324 * c-parser.c (c_parser_alignas_specifier): Use
1325 c_sizeof_or_alignof_type instead of c_alignof.
1326 (c_parser_alignof_expression): Likewise, with min_alignof
1327 parameter depending on alignof spelling used.
1328
bdf1e3c7 13292013-12-04 Marek Polacek <polacek@redhat.com>
1330
1331 PR c/54113
1332 * c-decl.c (start_function): Don't warn for missing prototype for
1333 inline functions.
1334
05e8f674 13352013-12-03 Marek Polacek <polacek@redhat.com>
1336
1337 PR c/59351
1338 * c-decl.c (build_compound_literal): Allow compound literals with
1339 empty initial value.
1340
39f74d66 13412013-12-02 Joseph Myers <joseph@codesourcery.com>
1342
1343 PR c/58235
1344 * c-typeck.c (build_modify_expr): Diagnose assignment to
1345 expression with array type.
1346
f221adca 13472013-11-29 Joseph Myers <joseph@codesourcery.com>
1348
1349 PR c/42262
1350 * c-typeck.c (process_init_element): Do not treat a string as
1351 initializing a whole array when used with a designator for an
1352 individual element.
1353
75bce827 13542013-11-29 Joseph Myers <joseph@codesourcery.com>
1355
1356 PR c/57574
1357 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1358 an inline function following a static declaration.
1359
dc133326 13602013-11-28 Jakub Jelinek <jakub@redhat.com>
1361
1362 PR c/59310
1363 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1364 to p_name before calling c_parser_omp_teams instead of after.
1365 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1366 argument. Remove unused p_name variable.
1367
d09768a4 13682013-11-27 Aldy Hernandez <aldyh@redhat.com>
1369 Jakub Jelinek <jakub@redhat.com>
1370
1371 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1372 external_scope is NULL.
1373
73fd9cbe 13742013-11-27 Tom de Vries <tom@codesourcery.com>
1375 Marc Glisse <marc.glisse@inria.fr>
1376
1377 PR c++/59032
1378 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1379
bc61cadb 13802013-11-22 Andrew MacLeod <amacleod@redhat.com>
1381
1382 * c-typeck.c: Add required include files from gimple.h.
1383
3df42822 13842013-11-22 David Malcolm <dmalcolm@redhat.com>
1385
1386 * c-decl.c (define_label, shadow_tag_warned)
1387 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1388 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1389 (declspecs_add_type): Remove use of in_system_header macro.
1390 * c-parser.c (c_parser_unary_expression): Likewise.
1391 * c-typeck.c (store_init_value, process_init_element)
1392 (c_start_case): Likewise.
1393
1394 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1395 macro.
1396
1397 * c-parser.c (c_parser_set_source_position_from_token): Remove
1398 reference to in_system_header from comment.
1399
08f817b3 14002013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1401
1402 * c-decl.c (grokdeclarator): Update comment to refer to
1403 tree_to_[su]hwi rather than tree_low_cst.
1404
6a0712d4 14052013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1406
1407 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1408 tree_to_uhwi throughout.
1409
fcb97e84 14102013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1411
1412 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1413 throughout.
1414
35ec552a 14152013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1416
1417 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1418 throughout.
1419
f2697631 14202013-11-15 Aldy Hernandez <aldyh@redhat.com>
1421
1422 * c-parser.c (c_parser_cilk_simd): New.
1423 (c_parser_cilk_verify_simd): New.
1424 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1425 (c_parser_omp_for_loop): Add case for NE_EXPR.
1426 Set c_break_label for CILK_SIMD.
1427 (c_parser_cilk_clause_vectorlength): New.
1428 (c_parser_cilk_clause_linear): New.
1429 (c_parser_cilk_clause_name): New.
1430 (c_parser_cilk_all_clauses): New.
1431 * c-typeck.c (build_unary_op): Pass location argument to
1432 readonly_error.
1433 (build_modify_expr): Same.
1434 (build_asm_expr): Same.
1435 (c_finish_bc_stmt): Error on break/continue in loops.
1436
e795d6e1 14372013-11-14 Andrew MacLeod <amacleod@redhat.com>
1438
1439 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1440
9ed99284 14412013-11-14 Diego Novillo <dnovillo@google.com>
1442
1443 * c-decl.c: Include print-tree.h.
1444 Include stor-layout.h.
1445 Include varasm.h.
1446 Include attribs.h.
1447 Include stringpool.h.
1448 * c-lang.c: Include fold-const.h.
1449 * c-parser.c: Include stringpool.h.
1450 Include attribs.h.
1451 Include stor-layout.h.
1452 Include varasm.h.
1453 Include trans-mem.h.
1454 * c-typeck.c: Include stor-layout.h.
1455 Include trans-mem.h.
1456 Include varasm.h.
1457 Include stmt.h.
1458
4fba5eb9 14592013-11-13 Joseph Myers <joseph@codesourcery.com>
1460
1461 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1462 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1463 __auto_type.
1464 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1465 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1466 RID_AUTO_TYPE.
1467 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1468 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1469 (c_parser_declarator, c_parser_direct_declarator_inner)
1470 (c_parser_parameter_declaration, c_parser_type_name): All callers
1471 changed.
1472 (c_parser_declaration_or_fndef): Handle declarations with type
1473 determined from the initializer.
1474
a8783bee 14752013-11-12 Andrew MacLeod <amacleod@redhat.com>
1476
e795d6e1 1477 * c-typeck.c: Include gimplify.h.
a8783bee 1478
d184e0c0 14792013-11-12 Joseph Myers <joseph@codesourcery.com>
1480
1481 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1482 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1483 comment.
1484 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1485 or _Thread_local as appropriate in diagnostics.
1486 (build_null_declspecs): Initialize ret->thread_gnu_p.
1487 (declspecs_add_scspec): Handle either __thread or _Thread_local
1488 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1489 pedantic. Do not disallow _Thread_local extern and _Thread_local
1490 static.
1491
b560fabd 14922013-11-07 Joseph Myers <joseph@codesourcery.com>
1493 Andrew MacLeod <amacleod@redhat.com>
1494
1495 * c-aux-info.c (gen_type): Handle atomic qualifier.
1496 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1497 qualifiers when compating types.
1498 (shadow_tag_warned): Handle atomic_p in declspecs.
1499 (quals_from_declspecs): Likewise.
1500 (start_decl): Use c_type_promotes_to when promoting argument
1501 types.
1502 (grokdeclarator): Handle _Atomic.
1503 (get_parm_info): Diagnose any qualifier on "void" as only
1504 parameter.
1505 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1506 comparing types. Use c_type_promotes_to when promoting argument
1507 types.
1508 (finish_function): Use c_type_promotes_to when promoting argument
1509 types.
1510 (build_null_declspecs): Handle atomic_p in declspecs.
1511 (declspecs_add_qual): Handle RID_ATOMIC.
1512 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1513 (c_token_starts_declspecs): Handle RID_ATOMIC.
1514 (c_parser_declspecs): Handle atomic type specifiers and
1515 qualifiers.
1516 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1517 from types of expressions with atomic type.
1518 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1519 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1520 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1521 (c_parser_statement_after_labels, c_parser_switch_statement)
1522 (c_parser_for_statement, c_parser_expr_no_commas)
1523 (c_parser_conditional_expression, c_parser_binary_expression)
1524 (c_parser_cast_expression, c_parser_unary_expression)
1525 (c_parser_postfix_expression)
1526 (c_parser_postfix_expression_after_primary, c_parser_expression):
1527 Use convert_lvalue_to_rvalue.
1528 (c_parser_expression_conv, c_parser_expr_list): Document
1529 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1530 (c_parser_objc_synchronized_statement): Use
1531 convert_lvalue_to_rvalue.
1532 (c_parser_objc_selector): Handle RID_ATOMIC.
1533 (c_parser_objc_receiver, c_parser_array_notation): Use
1534 convert_lvalue_to_rvalue.
1535 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1536 _Atomic (type-name).
1537 (struct c_declspecs): Add atomic_p field.
1538 (convert_lvalue_to_rvalue): Declare.
1539 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1540 corresponding atomic types.
1541 (qualify_type): Don't add _Atomic qualifiers from second argument.
1542 (comp_target_types): Do not allow _Atomic mismatches.
1543 (type_lists_compatible_p): Do not remove atomic qualifiers when
1544 comparing types.
1545 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1546 (build_atomic_assign): New functions.
1547 (build_unary_op): Use build_atomic_assign for atomic increment and
1548 decrement.
1549 (build_conditional_expr): Do not treat _Atomic void as a qualified
1550 version of void.
1551 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1552 (find_anonymous_field_with_type, convert_to_anonymous_field)
1553 (convert_for_assignment): Do not remove atomic qualifiers when
1554 comparing types.
1555 (digest_init): Do not accept initialization of arrays of atomic
1556 elements by string constants.
1557 (build_asm_expr): Use convert_lvalue_to_rvalue.
1558 (build_binary_op): Do not treat _Atomic void as a qualified
1559 version of void.
1560
8b023e7c 15612013-11-06 DJ Delorie <dj@redhat.com>
1562
1563 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1564 both explicit and builtin, print the location of the explicit one.
1565
c630ef93 15662013-11-05 Tobias Burnus <burnus@net-b.de>
1567
1568 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1569 c_parser_omp_distribute, c_parser_omp_teams,
1570 c_parser_omp_target, c_parser_omp_declare): Handle
1571 -fopenmp-simd.
1572
2c4c3477 15732013-11-03 Marek Polacek <polacek@redhat.com>
1574
1575 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1576
df205251 15772013-11-01 Jakub Jelinek <jakub@redhat.com>
1578
1579 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1580 check_dup_generic at the end, unless remove is true.
1581 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1582 remove = true;.
1583 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1584
23871d0c 15852013-10-31 Jakub Jelinek <jakub@redhat.com>
1586
1587 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1588 with decl that is not pointer nor array.
1589
d037099f 15902013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1591
1592 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1593 a spawning function is found.
1594 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1595 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1596 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1597 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1598 case.
1599 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1600 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1601 expr.
1602 (c_finish_return): Added a check to reject _Cilk_spawn in return
1603 expression.
1604 (build_cilk_spawn): New function.
1605 (build_cilk_sync): Likewise.
1606 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1607
4c90c04c 16082013-10-27 Tobias Burnus <burnus@net-b.de>
1609
1610 PR other/33426
1611 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1612 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1613 (c_parser_statement_after_labels): Update calls.
1614
48a972c8 16152013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 1616
1617 PR other/33426
1618 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1619 Handle PRAGMA_IVDEP.
1620 (c_parser_statement_after_labels): Update call.
1621
12f86df0 16222013-10-24 Marek Polacek <polacek@redhat.com>
1623
1624 * c-parser.c (c_parser_struct_declaration): Add a comment.
1625 (c_parser_declarator): Don't allow _Alignas here.
1626
7740abd8 16272013-10-17 Andrew MacLeod <amacleod@redhat.com>
1628
1629 * c-parser.c: Include omp-low.h.
1630 * c-typeck.c: Likewise.
1631
43d03c23 16322013-10-17 Marek Polacek <polacek@redhat.com>
1633
1634 PR c/58267
1635 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1636 Document syntax of the array-declarator.
1637 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1638 are not permitted.
1639 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1640 (c_parser_struct_declaration): Likewise.
1641 (c_parser_declarator): Likewise.
1642 (c_parser_direct_declarator_inner): Likewise.
1643 (c_parser_parameter_declaration): Likewise.
1644 (c_parser_type_name): Likewise.
1645
bc7bff74 16462013-10-11 Jakub Jelinek <jakub@redhat.com>
1647
1648 * c-lang.h (current_omp_declare_target_attribute): New extern
1649 decl.
1650 * c-parser.c: Include c-lang.h.
1651 (struct c_parser): Change tokens to c_token *.
1652 Add tokens_buf field. Change tokens_avail type to unsigned int.
1653 (c_parser_consume_token): If parser->tokens isn't
1654 &parser->tokens_buf[0], increment parser->tokens.
1655 (c_parser_consume_pragma): Likewise.
1656 (enum pragma_context): Add pragma_struct and pragma_param.
1657 (c_parser_external_declaration): Adjust
1658 c_parser_declaration_or_fndef caller.
1659 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1660 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1661 Adjust recursive call.
1662 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1663 of pragma_external.
1664 (c_parser_parameter_declaration): Use pragma_param instead of
1665 pragma_external.
1666 (c_parser_compound_statement_nostart, c_parser_label,
1667 c_parser_for_statement): Adjust
1668 c_parser_declaration_or_fndef callers.
1669 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1670 it through to c_parser_conditional_expression.
1671 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1672 pass it through to c_parser_binary_expression. Adjust recursive
1673 call.
1674 (c_parser_binary_expression): Remove prec argument, add
1675 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1676 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1677 binop matches it, use build2 instead of parser_build_binary_op.
1678 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1679 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1680 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1681 Handle pragma_struct and pragma_param the same as pragma_external.
1682 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1683 (c_parser_omp_variable_list): Parse array sections for
1684 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1685 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1686 (c_parser_omp_clause_reduction): Handle user defined reductions.
1687 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1688 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1689 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1690 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1691 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1692 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1693 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1694 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1695 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1696 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1697 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1698 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1699 (c_parser_omp_for_loop): Add CODE argument, pass it through
1700 to c_finish_omp_for. Change last argument to cclauses,
1701 and adjust uses to grab parallel clauses from the array of all
1702 the split clauses. Adjust c_parser_binary_expression,
1703 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1704 (omp_split_clauses): New function.
1705 (c_parser_omp_simd): New function.
1706 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1707 Allow the function to be called also when parsing combined constructs,
1708 and call c_parser_omp_simd when parsing for simd.
1709 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1710 #pragma omp section, require exactly one structured-block instead of
1711 sequence of statements.
1712 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1713 Allow the function to be called also when parsing combined constructs.
1714 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1715 Allow the function to be called also when parsing combined
1716 constructs.
1717 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1718 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1719 c_parser_omp_teams, c_parser_omp_target_data,
1720 c_parser_omp_target_update, c_parser_omp_target,
1721 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1722 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1723 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1724 (c_parser_omp_construct): Add p_name and mask vars. Handle
1725 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1726 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1727 and c_parser_omp_sections callers.
1728 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1729 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1730 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1731 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1732 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1733 OMP_CLAUSE_DEPEND.
1734 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1735 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1736 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1737 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1738 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1739 * c-typeck.c: Include tree-inline.h.
1740 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1741 handle_omp_array_sections_1, handle_omp_array_sections,
1742 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1743 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1744 user defined reductions.
1745 (c_tree_equal): New function.
1746 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1747 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1748 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1749 c_check_omp_declare_reduction_r): New prototypes.
1750 * c-decl.c (current_omp_declare_target_attribute): New variable.
1751 (c_decl_attributes): New function.
1752 (start_decl, start_function): Use it instead of decl_attributes.
1753 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1754 c_omp_reduction_decl, c_omp_reduction_lookup,
1755 c_check_omp_declare_reduction_r): New functions.
1756
3ce7d1bd 17572013-09-25 Tom Tromey <tromey@redhat.com>
1758
1759 * Make-lang.in (c/gccspec.o): Remove.
1760 (CFLAGS-c/gccspec.o): New variable.
1761 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1762 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1763 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1764
96da1c1d 17652013-09-25 Tom Tromey <tromey@redhat.com>
1766
1767 * Make-lang.in (c/gccspec.o): Don't use subshell.
1768
1b309377 17692013-09-18 Marek Polacek <polacek@redhat.com>
1770
1771 PR sanitize/58443
1772 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1773 Remove unnecessary check.
1774
05f893e1 17752013-09-18 Marek Polacek <polacek@redhat.com>
1776
1777 PR sanitizer/58411
1778 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1779 no_sanitize_undefined attribute.
1780
bda0b9d2 17812013-09-13 Kai Tietz <ktietz@redhat.com>
1782
1783 PR target/57848
1784 * c-decl.c (c_builtin_function_ext_scope): Remove
1785 wrong assumption that it is never called on prexisting
1786 symbol.
1787
73437615 17882013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1789
1790 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1791
eaab24b9 17922013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1793
1794 * c-objc-common.c (c_tree_printer): Tidy.
1795
9e46467d 17962013-08-30 Marek Polacek <polacek@redhat.com>
1797
1798 * c-typeck.c (build_binary_op): Add division by zero and shift
1799 instrumentation.
1800
f8234178 18012013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 1802 Joseph Myers <joseph@codesourcery.com>
f8234178 1803
c90a7d10 1804 PR c/35649
f8234178 1805 * c-typeck.c (c_common_type): Prefer double_type_node over
1806 other REAL_TYPE types with the same precision.
1807 (convert_arguments): Likewise.
1808
6f07f480 18092013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1810
1811 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1812 (c_initialize_diagnostics): Call a destructor for the early printer.
1813
eed6bc21 18142013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1815
1816 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1817 printer initialization.
1818
57717943 18192013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 1820
57717943 1821 PR c/57490
1822 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1823 check for truth values.
1824 (expand_array_notation_exprs): Added truth values case. Removed an
1825 unwanted else. Added for-loop to walk through subtrees in default
1826 case.
1827
a94db6b0 18282013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1829
1830 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1831
e76163a9 18322013-07-23 Joseph Myers <joseph@codesourcery.com>
1833
1834 * c-parser.c (struct c_generic_association): Fix typo.
1835
7aa04c8d 18362013-07-23 Tom Tromey <tromey@redhat.com>
1837 Joseph Myers <joseph@codesourcery.com>
1838
1839 * c-parser.c (struct c_generic_association): New.
1840 (c_generic_association_d): New typedef.
1841 (c_parser_generic_selection): New function.
1842 (c_parser_postfix_expression): Handle RID_GENERIC.
1843
76bbe4ca 18442013-07-13 Jason Merrill <jason@redhat.com>
1845
1846 PR c++/57793
1847 * c-decl.c (finish_struct): Check for too-large class.
1848
21ebaa24 18492013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 1850
1851 PR c/57821
1852 * c-typeck.c (set_init_index): When folding, check for index overflow.
1853
936c3081 18542013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1855
1856 * c-parser.c (c_parser_array_notation): Removed rejection of array
1857 notations in an array of function pointers.
1858
50acebe0 18592013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1860
1861 * c-array-notation.c (make_triplet_val_inv): New function.
1862 (create_cmp_incr): Likewise.
1863 (create_array_refs): Likewise.
1864 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1865 Also modularized common parts between functions and called the function.
1866 (build_array_notation_expr): Likewise.
1867 (fix_conditional_array_notations_1): Likewise.
1868 (fix_array_notation_expr): Likewise.
1869 (fix_array_notation_call_expr): Likewise.
1870
01e6cdb4 18712013-06-18 Marek Polacek <polacek@redhat.com>
1872
1873 PR c/57630
1874 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1875
6a3adac6 18762013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1877
1878 * c-array-notation.c (build_array_notation_expr): Reject array notation
1879 mismatch between LHS and RHS even inside a call_expr. Also, removed
1880 a couple while statements that were dead code.
1881
62aab3f3 18822013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1883
1884 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1885 excessive precision expressions in function parameters. Also removed
1886 couple unwanted while statements.
1887
bfc83720 18882013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1889
1890 * c-array-notation.c (expand_array_notation_exprs): Added
1891 ARRAY_NOTATION_REF case.
1892
09970d67 18932013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1894
1895 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1896 function to c-family/array-notation-common.c.
1897 (is_cilkplus_reduce_builtin): Likewise.
1898 (find_rank): Likewise.
1899 (extract_array_notation_exprs): Likewise.
1900 (replace_array_notations): Likewise.
1901 (find_inv_trees): Likewise.
1902 (replace_inv_trees): Likewise.
1903 (contains_array_notation_expr): Likewise.
1904 (find_correct_array_notation_type): Likewise.
1905 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1906 (struct inv_list): Moved this to c-family/array-notation-common.c.
1907 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1908
6e13bc01 19092013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1910
1911 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1912 reduction functions outside the for-loop. Added a check if the fundecl
1913 is non-NULL. Finally, removed an unwanted if-statement, and made the
1914 body unconditional.
1915
cc92dddc 19162013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1917
1918 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1919 condition of the if-statement matches the rank of else-block and then-
1920 block when array notations are used.
1921 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1922 expression after the entire function body is parsed.
1923 (c_parser_expr_no_commas): Delayed creating array notation expressions
1924 to the end of function parsing.
1925 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1926 whole if-statement instead of just the condition.
1927 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1928
eddc63fd 19292013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1930
1931 PR c/57474
1932 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1933 array to NULL_TREE if they are unused. Also added a check for the
1934 field to be NULL before its fields are used in future.
1935
a2115a4a 19362013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1937
1938 PR bootstrap/57450
1939 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1940 (build_array_notation_expr): Likewise.
1941
3c6d4197 19422013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1943
1944 * c-typeck.c (build_array_ref): Added a check to see if array's
1945 index is greater than one. If true, then emit an error.
1946 (build_function_call_vec): Exclude error reporting and checking
1947 for builtin array-notation functions.
1948 (convert_arguments): Likewise.
1949 (c_finish_return): Added a check for array notations as a return
1950 expression. If true, then emit an error.
1951 (c_finish_loop): Added a check for array notations in a loop
1952 condition. If true then emit an error.
1953 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1954 (build_binary_op): Added a check for array notation expr inside
1955 op1 and op0. If present, we call another function to find correct
1956 type.
1957 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1958 * c-parser.c (c_parser_compound_statement): Check if array
1959 notation code is used in tree, if so, then transform them into
1960 appropriate C code.
1961 (c_parser_expr_no_commas): Check if array notation is used in LHS
1962 or RHS, if so, then build array notation expression instead of
1963 regular modify.
1964 (c_parser_postfix_expression_after_primary): Added a check for
1965 colon(s) after square braces, if so then handle it like an array
1966 notation. Also, break up array notations in unary op if found.
1967 (c_parser_direct_declarator_inner): Added a check for array
1968 notation.
1969 (c_parser_compound_statement): Added a check for array notation in
1970 a stmt. If one is present, then expand array notation expr.
1971 (c_parser_if_statement): Likewise.
1972 (c_parser_switch_statement): Added a check for array notations in
1973 a switch statement's condition. If true, then output an error.
1974 (c_parser_while_statement): Similarly, but for a while.
1975 (c_parser_do_statement): Similarly, but for a do-while.
1976 (c_parser_for_statement): Similarly, but for a for-loop.
1977 (c_parser_unary_expression): Check if array notation is used in a
1978 pre-increment or pre-decrement expression. If true, then expand
1979 them.
1980 (c_parser_array_notation): New function.
1981 * c-array-notation.c: New file.
1982 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1983
2c1c8a2c 19842013-05-23 Mike Stump <mikestump@comcast.net>
1985
1986 * c-typeck.c (convert_for_assignment): Handle references to memory
1987 spaces better.
1988
be5f9e46 19892013-05-16 Jason Merrill <jason@redhat.com>
1990
1991 * Make-lang.in (cc1$(exeext)): Use link mutex.
1992
9205a6cc 19932013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1994
1995 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1996 to simply use OPT_Wpointer_arith.
1997 (build_unary_op): Likewise.
1998
0b049e15 19992013-04-03 Jakub Jelinek <jakub@redhat.com>
2000
2001 PR c/19449
2002 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2003 argument. If set, or it temporarily for parsing of the first
2004 argument into force_folding_builtin_constant_p.
2005 (c_parser_postfix_expression): Adjust callers.
2006
8e966116 20072013-03-21 Richard Biener <rguenther@suse.de>
2008
2009 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2010 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2011
b862f263 20122013-02-12 Marek Polacek <polacek@redhat.com>
2013
2014 PR c/44938
2015 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2016 origtypes to NULL.
2017
54550ecb 20182013-01-24 Jakub Jelinek <jakub@redhat.com>
2019
2020 PR c/56078
2021 * c-typeck.c (set_nonincremental_init_from_string): If
2022 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2023 returned false.
2024 (process_init_element): Likewise.
2025
035b65e2 20262012-12-20 Jakub Jelinek <jakub@redhat.com>
2027
2028 PR c++/55619
2029 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2030 argument, don't call default_function_array_conversion
2031 nor c_fully_fold here.
2032 (c_parser_asm_statement): Adjust callers.
2033 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2034 and outputs here, and call default_function_array_conversion
2035 on inputs that don't need to be addressable.
2036
7cbb7f1a 20372012-12-18 Jakub Jelinek <jakub@redhat.com>
2038
2039 PR c/39464
2040 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2041 warning require that both c_common_unsigned_type as well as
2042 c_common_signed_type is the same for both mvl and mvr types.
2043
f1f41a6c 20442012-11-16 Diego Novillo <dnovillo@google.com>
2045
2046 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2047
2048 * c-common.c: Use new vec API in vec.h.
2049 * c-common.h: Likewise.
2050 * c-gimplify.c: Likewise.
2051 * c-pragma.c: Likewise.
2052 * c-pretty-print.c: Likewise.
2053 * c-pretty-print.h: Likewise.
2054 * c-semantics.c: Likewise.
2055 * c-decl.c: Likewise.
2056 * c-parser.c: Likewise.
2057 * c-tree.h: Likewise.
2058 * c-typeck.c: Likewise.
2059
8b447d3f 20602012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2061
2062 PR c++/54930
2063 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2064
08fc5390 20652012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2066
2067 PR c/53066
2068 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2069 shadows a function, unless the variable is a function or a
2070 pointer-to-function.
2071
57f872a2 20722012-10-12 Jakub Jelinek <jakub@redhat.com>
2073
2074 PR c/54381
2075 * c-parser.c (struct c_tree_loc_pair): Removed.
2076 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2077 add location_t * and tree * arguments, fill in array of 3
2078 sizeof_arg trees and corresponding locs.
2079 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2080 c_parser_expr_list callers.
2081 (c_parser_postfix_expression_after_primary): Likewise. Pass
2082 array of 3 sizeof_arg trees and locs (corresponding to first
2083 3 arguments) to sizeof_pointer_memaccess_warning.
2084
d1455aa3 20852012-10-09 Lawrence Crowl <crowl@google.com>
2086
2087 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2088 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2089 hash table.
2090
b0e7825e 20912012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2092
2093 PR c++/54194
2094 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2095 call.
2096
41ed701a 20972012-10-09 Marc Glisse <marc.glisse@inria.fr>
2098
2099 PR c++/54427
2100 * c-typeck.c: Include c-common.h.
2101 (enum stv_conv): Moved to c-common.h.
2102 (scalar_to_vector): Moved to c-common.c.
2103 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2104 * Make-lang.in: c-typeck.c depends on c-common.h.
2105
ef34afc1 21062012-10-04 Arnaud Charlet <charlet@adacore.com>
2107
2108 * c-decl.c (c_write_global_declarations): Fix handling of
2109 -fdump-ada-spec*.
2110
7bd765d4 21112012-09-30 Sharad Singhai <singhai@google.com>
2112
2113 * c-decl.c (c_write_global_declarations): Use a different method
2114 to determine if the dump has ben initialized.
2115
c4b1a13a 21162012-09-14 Joseph Myers <joseph@codesourcery.com>
2117
2118 PR c/54552
2119 * c-typeck.c (c_cast_expr): When casting to a type requiring
2120 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2121 c_fully_fold first.
2122
bb554051 21232012-09-14 Joseph Myers <joseph@codesourcery.com>
2124
2125 PR c/54103
2126 * c-typeck.c (build_unary_op): Pass original argument of
2127 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2128 any C_MAYBE_CONST_EXPR, if it has integer operands.
2129 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2130 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2131 to c_objc_common_truthvalue_conversion, then remove any
2132 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2133 c_objc_common_truthvalue_conversion not
2134 c_common_truthvalue_conversion.
2135 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2136 call note_integer_operands for arguments with integer operands
2137 that are not integer constants.
2138
c708c6ef 21392012-09-13 Jakub Jelinek <jakub@redhat.com>
2140
2141 PR c/54559
2142 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2143 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2144
cce20430 21452012-08-31 Jakub Jelinek <jakub@redhat.com>
2146
2147 PR c/54428
2148 * c-convert.c (convert): Don't call fold_convert_loc if
2149 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2150 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2151 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2152
a90d57ed 21532012-08-24 Jakub Jelinek <jakub@redhat.com>
2154
2155 PR c/54355
2156 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2157 for nested and empty_ok arguments in the call to
2158 c_parser_declaration_or_fndef.
2159
f003f5dc 21602012-08-17 Jakub Jelinek <jakub@redhat.com>
2161
2162 * c-tree.h (c_last_sizeof_arg): Declare.
2163 * c-parser.c (struct c_tree_loc_pair): New type.
2164 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2165 non-NULL.
2166 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2167 (c_parser_postfix_expression_after_primary): Likewise. Call
2168 sizeof_pointer_memaccess_warning if needed.
2169 (sizeof_ptr_memacc_comptypes): New function.
2170 * c-typeck.c (c_last_sizeof_arg): New global variable.
2171 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2172
a5656b73 21732012-07-24 Uros Bizjak <ubizjak@gmail.com>
2174
2175 * c-lang.h (lang_decl): Add variable_size GTY option.
2176
b9ed1410 21772012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2178
2179 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2180 * Make-lang.in: Fix dependencies.
2181
e53d55e7 21822012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2183
2184 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2185 and add language Makefile hooks.
2186 * config-lang.in: New file.
2187 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2188 add the required "normal" config-lang.in rules.
2189 * c-lang.h: Moved from gcc/ to here.
2190 * c-tree.h: Likewise.
2191 * c-objc-common.c: Likewise.
2192 * c-objc-common.h: Likewise.
2193 * c-typeck.c: Likewise.
2194 * c-convert.c: Likewise.
2195 * c-lang.c: Likewise.
2196 * c-aux-info.c: Likewise.
2197 * c-errors.c: Likewise.
2198 * gccspec.c: Likewise.
2199 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2200 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2201\f
d353bf18 2202Copyright (C) 2012-2015 Free Software Foundation, Inc.
e53d55e7 2203
2204Copying and distribution of this file, with or without modification,
2205are permitted in any medium without royalty provided the copyright
2206notice and this notice are preserved.