]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Fix typos in entry from yesterday, as requested.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
4e81b788
MP
12015-04-28 Marek Polacek <polacek@redhat.com>
2
3 PR c/65901
4 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
5
6c1db78e
MP
62015-04-25 Marek Polacek <polacek@redhat.com>
7
8 PR c/52085
9 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
10 attribute.
11
5c4abbb8
MP
122015-04-23 Marek Polacek <polacek@redhat.com>
13
14 PR c/65345
15 * c-decl.c (set_labels_context_r): New function.
16 (store_parm_decls): Call it via walk_tree_without_duplicates.
17 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
18 instead of create_tmp_var. Build TARGET_EXPR instead of
19 COMPOUND_EXPR.
20 (build_atomic_assign): Use create_tmp_var_raw instead of
21 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
22
06aca1d5
IV
232015-04-20 Ilya Verbin <ilya.verbin@intel.com>
24
25 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
26 (c_parser_omp_target_update): Add missed %> to error_at ().
27
8fba1830
BRF
282015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
29
30 PR target/55143
31 * c-decl.c (c_default_pointer_mode): Remove definition.
32 * c-tree.h (c_default_pointer_mode): Remove declaration.
33
62021f64
TB
342015-03-27 Tobias Burnus <burnus@net-b.de>
35
36 PR c/65586
37 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
38 error out.
39 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
40 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
41 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
42
9b65e171
JJ
432015-03-19 Jakub Jelinek <jakub@redhat.com>
44
45 * c-decl.c (c_decl_attributes): Also add "omp declare target"
46 attribute for DECL_EXTERNAL VAR_DECLs.
47
17958621
JJ
482015-03-11 Jakub Jelinek <jakub@redhat.com>
49
50 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
51 argument.
52
7ccb1a11
JJ
532015-03-10 Jakub Jelinek <jakub@redhat.com>
54
55 PR c/65120
56 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
57 before preparing arguments to warn_logical_not_parentheses.
58
01177669
JJ
592015-03-09 Jakub Jelinek <jakub@redhat.com>
60
61 PR c/65120
62 * c-typeck.c (parser_build_binary_op): Don't warn for
63 !!x == y or !b == y where b is _Bool.
64
802ac282
MP
652015-03-09 Marek Polacek <polacek@redhat.com>
66
67 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
68 * c-decl.c (grokdeclarator): Likewise.
69 * c-typeck.c (build_binary_op): Likewise.
70
e5165b60
MP
712015-02-27 Marek Polacek <polacek@redhat.com>
72
73 PR c/65228
74 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
75
065d214c
MP
762015-02-14 Marek Polacek <polacek@redhat.com>
77
78 PR c/64768
79 * c-decl.c (grokdeclarator): Set the range of a flexible array member
80 declared through a typedef name.
81
e5d9235b
MP
822015-02-13 Marek Polacek <polacek@redhat.com>
83
84 PR c/65050
85 * c-decl.c (grokdeclarator): Print also the type when giving
86 the error message about array's incomplete element type.
87
fa01ffcc
JJ
882015-02-11 Jakub Jelinek <jakub@redhat.com>
89
90 PR c/64824
91 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
92 check in the POP macro.
93
c3e38a03
MP
942015-02-09 Marek Polacek <polacek@redhat.com>
95
96 PR c/64856
97 * c-typeck.c (process_init_element): Don't always wrap
98 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
99 initializing a range of elements.
100
4886ec8e
JJ
1012015-02-04 Jakub Jelinek <jakub@redhat.com>
102
103 PR c/64824
104 PR c/64868
105 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
106
c3e38a03 1072015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
108
109 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
110 processing enum declaration.
111
7b33f0c8
MP
1122015-01-29 Marek Polacek <polacek@redhat.com>
113
114 PR c/64709
115 * c-typeck.c (pop_init_level): If constructor_elements has
116 exactly one element with integer_zerop value, set constructor_zeroinit
117 to 1. Remove braces around warning_init call.
118
dea63e49
JJ
1192015-01-27 Jakub Jelinek <jakub@redhat.com>
120
121 PR c/64766
122 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
123 of FUNCTION_DECLs with error_mark_node.
124
d38f7dce
JJ
1252015-01-26 Jakub Jelinek <jakub@redhat.com>
126
127 PR c/64778
128 * c-typeck.c (convert_arguments): Return -1 if there are
129 error_args, even if we've diagnosed too many arguments.
130
cbf5d0e7
RB
1312015-01-21 Richard Biener <rguenther@suse.de>
132
133 PR middle-end/64313
134 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
135 for builtins the user declared correctly.
136
41dbbb37
TS
1372015-01-15 Thomas Schwinge <thomas@codesourcery.com>
138 Bernd Schmidt <bernds@codesourcery.com>
139 Cesar Philippidis <cesar@codesourcery.com>
140 James Norris <jnorris@codesourcery.com>
141 Jakub Jelinek <jakub@redhat.com>
142 Ilmir Usmanov <i.usmanov@samsung.com>
143
144 * c-parser.c: Include "gomp-constants.h".
145 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
146 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
147 Use OMP_CLAUSE_SET_MAP_KIND.
148 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
149 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
150 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
151 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
152 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
153 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
154 "copyout", "create", "delete", "deviceptr", "gang", "host",
155 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
156 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
157 "present_or_create", "pcreate", "seq", "self", "vector",
158 "vector_length", "wait", "worker".
159 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
160 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
161 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
162 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
163 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
164 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
165 (c_parser_oacc_data_clause_deviceptr)
166 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
167 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
168 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
169 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
170 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
171 (c_parser_oacc_parallel, c_parser_oacc_update)
172 (c_parser_oacc_wait): New functions.
173 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
174 (c_finish_oacc_data): New prototypes.
175 * c-typeck.c: Include "gomp-constants.h".
176 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
177 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
178 OMP_CLAUSE_SET_MAP_KIND.
179 (c_finish_oacc_parallel, c_finish_oacc_kernels)
180 (c_finish_oacc_data): New functions.
181 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
182 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
183 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
184 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
185 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
186 GOMP_MAP_FORCE_DEVICEPTR.
187
adfac8df
JJ
1882015-01-09 Michael Collison <michael.collison@linaro.org>
189
190 * c-array-notation.c: Include hash-set.h, machmode.h,
191 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
192 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
193 * c-aux-info.c: Ditto.
194 * c-convert.c: Ditto.
195 * c-decl.c: Ditto.
196 * c-errors.c: Ditto.
197 * c-lang.c: Dittoxs.
198 * c-objc-common.c: Ditto.
199 * c-parser.c: Ditto.
200 * c-typeck.c: Include hash-set.h, machmode.h,
201 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
202 fold-const.h, wide-int.h, inchash.h, real.h and
203 fixed-value.h due to flattening of tree.h.
204
2cc901dc
MP
2052015-01-07 Marek Polacek <polacek@redhat.com>
206
207 PR c/64417
208 * c-typeck.c (process_init_element): Disallow initialization of
209 a flexible array member with a string constant if the structure
210 is in an array.
211
5624e564
JJ
2122015-01-05 Jakub Jelinek <jakub@redhat.com>
213
e5341100
JJ
214 PR sanitizer/64344
215 * c-typeck.c (convert_for_assignment, c_finish_return): For
216 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
217 types also set in_late_binary_op around convert call.
218 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
219 to integral type casts, if not in_late_binary_op, pass c_fully_fold
220 result on expr as last argument to ubsan_instrument_float_cast,
221 if in_late_binary_op, don't use c_save_expr but save_expr.
222
5624e564
JJ
223 Update copyright years.
224
5bd012f8
MP
2252015-01-05 Marek Polacek <polacek@redhat.com>
226
227 PR c/64423
228 * c-typeck.c (build_array_ref): Pass loc down to
229 warn_array_subscript_with_type_char.
230
768952be
MU
2312014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
232
233 * c-typeck.c: New behavious for pointers to arrays with qualifiers
234 (common-pointer-type): For pointers to arrays take qualifiers from
235 element type.
236 (build_conditional_expr): Add warnings for lost qualifiers.
237 (comp-target-types): Allow pointers to arrays with different qualifiers.
238 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
239 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
240 to PEDWARN_FOR_QUALIFIERS.
241
8f94a8c4
JJ
2422014-12-17 Jakub Jelinek <jakub@redhat.com>
243
244 PR sanitizer/64289
245 * c-convert.c: Include ubsan.h.
246 (convert): For real -> integral casts and
247 -fsanitize=float-cast-overflow don't call convert_to_integer, but
248 instead instrument the float cast directly.
249
b731b390
JJ
2502014-11-29 Jakub Jelinek <jakub@redhat.com>
251
252 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
253 c_finish_stmt_expr): Remove NULL last argument from
254 create_tmp_var_raw and create_tmp_var calls.
255 * c-array-notation.c (fix_builtin_array_notation_fn,
256 build_array_notation_expr, fix_conditional_array_notations_1,
257 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
258
541e35a6
MP
2592014-11-28 Marek Polacek <polacek@redhat.com>
260
261 PR c/63862
262 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
263 convert the right operand to integer type.
264
b286be94
MP
2652014-11-25 Marek Polacek <polacek@redhat.com>
266
267 PR c/63877
268 * c-decl.c (start_function): Disable -Wmissing-declarations warning
269 for inline functions.
270
aa7da51a
JJ
2712014-11-21 Jakub Jelinek <jakub@redhat.com>
272
273 PR target/63764
274 * c-typeck.c (build_array_ref): Adjust
275 convert_vector_to_pointer_for_subscript caller. If it returns true,
276 call non_lvalue_loc on the result.
277
d876207f
RB
2782014-11-11 Richard Biener <rguenther@suse.de>
279
280 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
281 to true.
282
e5e44252
AK
2832014-11-10 Andi Kleen <ak@linux.intel.com>
284
285 PR c/60804
286 * c-parser.c (c_parser_statement_after_labels): Call
287 check_no_cilk.
288 (c_parser_if_statement): Dito.
289 (c_parser_switch_statement): Dito.
290 (c_parser_while_statement): Dito.
291 (c_parser_do_statement): Dito.
292 (c_parser_for_statement): Dito.
293 * c-typeck.c (c_finish_loop): Dito.
294
13c21655
PC
2952014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
296
297 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
298 OPT_Wshift_count_overflow in the warnings.
299
2d51fcef
MP
3002014-10-30 Marek Polacek <polacek@redhat.com>
301
302 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
303 print the stripped version as well, if they're not the same.
304
ef4bddc2
RS
3052014-10-29 Richard Sandiford <richard.sandiford@arm.com>
306
307 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
308 machine_mode.
309
c582198b
AM
3102014-10-28 Andrew MacLeod <amacleod@redhat.com>
311
312 * c-decl.c: Adjust include files.
313 * c-parser.c: Ditto.
314
ddc8de03
PM
3152014-10-27 Phil Muldoon <pmuldoon@redhat.com>
316 Tom Tromey <tromey@redhat.com>
317
318 * c-tree.h (enum c_oracle_request): New.
319 (c_binding_oracle_function): New typedef.
320 (c_binding_oracle, c_pushtag, c_bind): Declare.
321 * c-decl.c (c_binding_oracle): New global.
322 (I_SYMBOL_CHECKED): New macro.
323 (i_symbol_binding): New function.
324 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
325 (I_TAG_CHECKED): New macro.
326 (i_tag_binding): New function.
327 (I_TAG_BINDING, I_TAG_DECL): Redefine.
328 (I_LABEL_CHECKED): New macro.
329 (i_label_binding): New function.
330 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
331 (c_print_identifier): Save and restore c_binding_oracle.
332 (c_pushtag, c_bind): New functions.
333
60393bbc
AM
3342014-10-27 Andrew MacLeod <amacleod@redhat.com>
335
336 * c-typeck.c: Adjust include files.
337
d723bb7c
MLI
3382014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
339
340 PR c++/53061
341 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
342 initialization here...
343 (c_initialize_diagnostics): ... but here. Set defaults after
344 building pretty-printer.
345
1bc5a451
MP
3462014-10-23 Marek Polacek <polacek@redhat.com>
347
348 PR c/63626
349 * c-decl.c (pop_scope): Don't print warning in external_scope.
350
4435bb92
MP
3512014-10-19 Marek Polacek <polacek@redhat.com>
352
353 PR c/63567
354 * c-typeck.c (output_init_element): Allow initializing objects with
355 static storage duration with compound literals even in C99 and add
356 pedwarn for it.
357
7278465e
MP
3582014-10-17 Marek Polacek <polacek@redhat.com>
359
360 PR c/63567
361 * c-typeck.c (digest_init): Allow initializing objects with static
362 storage duration with compound literals even in C99 and add pedwarn
363 for it.
364
d9b7be2e
MP
3652014-10-17 Marek Polacek <polacek@redhat.com>
366
367 PR c/63543
368 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
369 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
370 error multiple times. Print the type.
371
f406ae1f
MP
3722014-10-17 Marek Polacek <polacek@redhat.com>
373
374 PR c/63549
375 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
376 type.
377
92574c7c
MP
3782014-10-17 Marek Polacek <polacek@redhat.com>
379
380 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
381 (start_function): Use OPT_Wimplicit_int instead of 0.
382 (store_parm_decls_oldstyle): Likewise.
383
1bc4a978
MT
3842014-10-17 Alan Modra <amodra@gmail.com>
385
386 PR middle-end/61848
387 * c-decl.c (merge_decls): Don't merge section name or tls model
388 to newdecl symtab node, instead merge to olddecl. Override
389 existing olddecl section name. Set tls_model for all thread-local
390 vars, not just OMP thread-private ones. Remove incorrect comment.
391
83685514
AM
3922014-10-16 Andrew MacLeod <amacleod@redhat.com>
393
394 * c-decl.c: Adjust include files.
395
78a7c317
DD
3962014-10-14 DJ Delorie <dj@redhat.com>
397
398 * c-parser.c (c_parse_init): Add RID entries for each __intN.
399 (c_token_starts_typename): Check all __intN, not just __int128.
400 (c_token_starts_declspecs): Likewise.
401 (c_parser_declspecs): Likewise.
402 (c_parser_attribute_any_word): Likewise.
403 (c_parser_objc_selector): Likewise.
404 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
405 (struct c_declspecs): Add int_n_idx field to record *which* __intN
406 is specified.
407 * c-decl.c (declspecs_add_type): Check for all __intN, not just
408 __int128.
409 (finish_declspecs): Likewise.
410
74d98c1e
AB
4112014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
412
413 * c-parser.c (c_parser_all_labels): New function to replace
414 the duplicate code.
415 (c_parser_statement): Call the new function.
416
84937de2
MP
4172014-10-09 Marek Polacek <polacek@redhat.com>
418
419 PR c/63480
420 * c-typeck.c (pop_init_level): Don't warn about initializing
421 with { }.
422
0382aaa0
MP
4232014-10-07 Marek Polacek <polacek@redhat.com>
424
425 PR c/59717
426 * c-decl.c (header_for_builtin_fn): New function.
427 (implicitly_declare): Suggest which header to include.
428
7a0ca710
MP
4292014-10-07 Marek Polacek <polacek@redhat.com>
430
431 * c-convert.c (convert): Use error_operand_p.
432 * c-typeck.c (require_complete_type): Likewise.
433 (really_atomic_lvalue): Likewise.
434 (digest_init): Likewise.
435 (handle_omp_array_sections_1): Likewise.
436
6bc8a126
MP
4372014-10-03 Marek Polacek <polacek@redhat.com>
438
439 PR c/63453
440 * c-decl.c (pop_scope): Don't warn about "inline function declared
441 but never defined" for functions marked with gnu_inline attribute.
442
d90c0a59
JJ
4432014-09-25 Jakub Jelinek <jakub@redhat.com>
444
445 PR c++/63249
446 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
447 on low_bound and length.
448
083e891e
MP
4492014-09-24 Marek Polacek <polacek@redhat.com>
450
451 PR c/61405
452 PR c/53874
453 * c-parser.c: Don't define CPP_KEYWORD.
454 (c_parser_switch_statement): Pass original type to c_finish_case.
455 * c-tree.h (c_finish_case): Update declaration.
456 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
457 conditionally to c_do_switch_warnings.
458
8d95fe25
MP
4592014-09-03 Marek Polacek <polacek@redhat.com>
460
461 PR c/62024
462 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
463 conversions.
464
9a771876
JJ
4652014-09-02 Jakub Jelinek <jakub@redhat.com>
466 Balaji V. Iyer <balaji.v.iyer@intel.com>
467 Igor Zamyatin <igor.zamyatin@intel.com>
468
469 * c-parser.c (c_parser_cilk_for): New function.
470 (c_parser_cilk_grainsize): Likewise.
471 (c_get_temp_regvar): Likewise.
472 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
473 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
474 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
475 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
476 case.
477
b7679d96
CG
4782014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
479
480 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
481 with using HOST_WIDE_INT without truncation to 'int'
482
59ea0364
MP
4832014-08-22 Marek Polacek <polacek@redhat.com>
484
485 PR c++/62199
486 * c-typeck.c (parser_build_binary_op): Adjust call to
487 warn_logical_not_parentheses.
488
671a475e
IZ
4892014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
490
491 PR other/62008
492 * c-parser.c (c_parser_array_notation): Check for correct
493 type of an array added.
494
04159acf
MP
4952014-08-19 Marek Polacek <polacek@redhat.com>
496
497 PR c++/62153
498 * c-typeck.c (build_binary_op): If either operand of a comparison
499 is a boolean expression, call maybe_warn_bool_compare.
500
c77935ee
PP
5012014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
502
503 PR c/45584
504 * c-typeck.c (build_c_cast): Do a conversion even when the
505 TYPE_MAIN_VARIANTs are the same.
506
35aff4fb
MP
5072014-08-19 Marek Polacek <polacek@redhat.com>
508
509 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
510 pedwarn_c99 instead of pedwarn.
511 (grokfield): Likewise.
512 (warn_defaults_to): New function.
513 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
514 Unconditionally call pedwarn_c99 instead of pedwarn.
515 (start_function): Call warn_defaults_to instead of pedwarn_c99.
516 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
517 check flag_isoc11 before.
518 * c-errors.c (pedwarn_c99): Change the return type to bool.
519 Handle -Wc99-c11-compat.
520 * c-parser.c (disable_extension_diagnostics): Handle
521 warn_c99_c11_compat.
522 (restore_extension_diagnostics): Likewise.
523 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
524 instead of pedwarn, don't check flag_isoc11 before.
525 (c_parser_declspecs): Likewise.
526 (c_parser_alignas_specifier): Likewise.
527 (c_parser_alignof_expression): Likewise.
528 (c_parser_generic_selection): Likewise.
529 * c-tree.h (pedwarn_c99): Update declaration.
530 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
531 of pedwarn_c99.
532
177cce46
MP
5332014-08-19 Marek Polacek <polacek@redhat.com>
534
535 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
536 to pedwarn_c90.
537 * c-errors.c: Include "opts.h".
538 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
539 * c-parser.c (disable_extension_diagnostics): Handle negative value
540 of warn_c90_c99_compat, too.
541 (restore_extension_diagnostics): Likewise.
542 (c_parser_compound_statement_nostart): Pass
543 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
544
6dc99c33
MP
5452014-08-12 Marek Polacek <polacek@redhat.com>
546
547 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
548 Add pedwarn.
549 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
550 Likewise.
551 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
552
f3bede71
MP
5532014-08-10 Marek Polacek <polacek@redhat.com>
554
555 PR c/51849
556 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
557 Call pedwarn_c90 instead of pedwarn.
558 (check_bitfield_type_and_width): Likewise.
559 (declspecs_add_qual): Likewise.
560 (declspecs_add_type): Likewise.
561 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
562 Adjust to only call pedwarn_c90.
563 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
564 pedwarn_c90 instead of pedwarn.
565 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
566 * c-parser.c (disable_extension_diagnostics): Handle
567 warn_c90_c99_compat.
568 (restore_extension_diagnostics): Likewise.
569 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
570 pedwarn_c90 instead of pedwarn.
571 (c_parser_initelt): Likewise.
572 (c_parser_postfix_expression): Likewise.
573 (c_parser_postfix_expression_after_paren_type): Likewise.
574 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
575 * c-tree.h: Fix formatting.
576 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
577 pedwarn_c90 instead of pedwarn.
578
9f25a338
TS
5792014-08-07 Trevor Saunders <tsaunders@mozilla.com>
580
581 * c-typeck.c: Remove include of pointer-set.h.
582
044331a8
MP
5832014-08-07 Marek Polacek <polacek@redhat.com>
584
585 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
586
b787e7a2
TS
5872014-08-02 Trevor Saunders <tsaunders@mozilla.com>
588
589 * c-typeck.c: Use hash_map instead of pointer_map.
590
6e2830c3
TS
5912014-08-02 Trevor Saunders <tsaunders@mozilla.com>
592
593 * c-decl.c: Use hash_set instead of pointer_set.
594
a7ee52fb
IZ
5952014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
596
597 PR middle-end/61455
598 * c-array-notation.c (expand_array_notations): Handling
599 of DECL_EXPR added.
600
b4dfdc11
MG
6012014-07-31 Marc Glisse <marc.glisse@inria.fr>
602
603 PR c++/60517
604 * c-typeck.c (c_finish_return): Return 0 instead of the address of
605 a local variable.
606
976d5a22
TT
6072014-07-30 Tom Tromey <tromey@redhat.com>
608
609 * c-typeck.c (struct constructor_stack) <designator_depth>: New
610 field.
611 (really_start_incremental_init, push_init_level): Initialize
612 designator_depth.
613 (pop_init_level): Set global designator_depth.
614 (process_init_element): Check for designated_init attribute.
615
30281de2
MP
6162014-07-20 Marek Polacek <polacek@redhat.com>
617
618 PR c/61852
619 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
620 (implicitly_declare): Pass location to implicit_decl_warning.
621
b108f48f
JJ
6222014-07-14 Jakub Jelinek <jakub@redhat.com>
623
624 PR middle-end/61294
625 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
626 If non-NULL, call c_parser_check_literal_zero.
627 (c_parser_check_literal_zero): New function.
628 (c_parser_postfix_expression_after_primary): Adjust
629 c_parser_expr_list caller, handle -Wmemset-transposed-args.
630
773ec47f
MP
6312014-07-06 Marek Polacek <polacek@redhat.com>
632
633 PR c/6940
634 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
635 * c-tree.h (C_ARRAY_PARAMETER): Define.
636 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
637 function parameter.
638
22e1cf1c
JH
6392014-07-02 Jan Hubicka <hubicka@ucw.cz>
640 Chen Gang <gang.chen.5i5j@gmail.com>
641
642 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
643 releasing symbol.
644
52ec0ea3
MP
6452014-07-01 Marek Polacek <polacek@redhat.com>
646
647 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
648 instead of 0 to WARN_FOR_ASSIGNMENT.
649
d5c3d343
MP
6502014-07-01 Marek Polacek <polacek@redhat.com>
651
652 PR c/58286
653 * c-typeck.c (convert_for_assignment): Pass
654 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
655
6a7253a4
MP
6562014-06-30 Marek Polacek <polacek@redhat.com>
657
658 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
659 has no_sanitize_undefined attribute.
660
5e88a8f4
IZ
6612014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
662
663 PR middle-end/57541
664 * c-array-notation.c (fix_builtin_array_notation_fn):
665 Check for 0 arguments in builtin call. Check that bultin argument is
666 correct.
667 * c-parser.c (c_parser_array_notation): Check for incorrect initial
668 index.
669
9698b078
SH
6702014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
671
672 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
673 qualifiers in __auto_type for atomic types.
674 (c_parser_typeof_specifier): Discard all type qualifiers in
675 __typeof__ for atomic types.
676
6e07c515
MP
6772014-06-25 Marek Polacek <polacek@redhat.com>
678
679 PR c/61162
680 * c-parser.c (c_parser_statement_after_labels): Pass the location of
681 the return expression to c_finish_return.
682
da6f124d
JJ
6832014-06-25 Jakub Jelinek <jakub@redhat.com>
684
685 * c-typeck.c (c_finish_omp_clauses): Make sure
686 OMP_CLAUSE_LINEAR_STEP has correct type.
687
c203e8a7
TS
6882014-06-24 Trevor Saunders <tsaunders@mozilla.com>
689
690 * c-decl.c: Adjust.
691
56ad0e38
JJ
6922014-06-24 Jakub Jelinek <jakub@redhat.com>
693
694 * c-parser.c (c_parser_omp_for_loop): For
695 #pragma omp parallel for simd move lastprivate clause from parallel
696 to for rather than simd.
697
47c2554f
MP
6982014-06-23 Marek Polacek <polacek@redhat.com>
699
700 * c-typeck.c (parser_build_binary_op): Don't call
701 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
702
56363ffd
JH
7032014-06-15 Jan Hubicka <hubicka@ucw.cz>
704
705 * c-parser.c (c_parser_omp_threadprivate): Likewise.
706 * c-decl.c (merge_decls): Likewise.
707
d7ff7ae5
MP
7082014-06-09 Marek Polacek <polacek@redhat.com>
709
710 PR c/36446
711 * c-typeck.c (error_init): Call inform instead of error_at.
712 (pedwarn_init): Call inform instead of pedwarn.
713 (warning_init): Call inform instead of warning_at.
714
24d047a3
JH
7152014-06-07 Jan Hubicka <hubicka@ucw.cz>
716
717 * c-decl.c (merge_decls): Use set_decl_section_name.
718 (duplicate_decls): Remove node if it exists.
719
9bac5cbb
G
7202014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
721
722 PR c/53119
723 * c-typeck.c (push_init_level, process_init_element,
724 pop_init_level): Correct check for zero initialization, move
725 missing brace warning to respect zero initialization.
726
8ffcdea8
MP
7272014-06-05 Marek Polacek <polacek@redhat.com>
728
729 PR c/56724
730 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
731
742938c9
MP
7322014-06-05 Marek Polacek <polacek@redhat.com>
733
734 PR c/49706
735 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
736 on the left hand side operand of a comparison.
737
6447c55d
MP
7382014-06-05 Marek Polacek <polacek@redhat.com>
739
740 PR c/48062
741 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
742 Print note only if the warning was printed.
743
9dc7743c
IZ
7442014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
745
746 PR c/58942
747 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
748 with a pointer.
749
fedfecef
MP
7502014-06-03 Marek Polacek <polacek@redhat.com>
751
752 PR c/60439
753 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
754 c_start_case.
755 * c-tree.h (c_start_case): Update.
756 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
757 switch condition has boolean value.
758
9b2b7279
AM
7592014-06-02 Andrew MacLeod <amacleod@redhat.com>
760
761 * c-decl.c: Include builtins.h.
762 * c-parser.c: Likewise.
763
5c1bc275
MP
7642014-05-27 Marek Polacek <polacek@redhat.com>
765
766 PR c/56724
767 * c-typeck.c (convert_arguments): Get location of a parameter. Change
768 error and warning calls to error_at and warning_at. Pass location of
769 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
770 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
771 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
772
97563bc8
IZ
7732014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
774
775 PR c/61191
776 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
777 function parameters.
778
aede2c10
JH
7792014-05-23 Jan Hubicka <hubicka@ucw.cz>
780
781 * c-decl.c (merge_decls): Preserve symtab node pointers.
782 (duplicate_decls): Free new decl.
783
edbba2ce
TS
7842014-05-23 Thomas Schwinge <thomas@codesourcery.com>
785
f3316c6d
TS
786 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
787 initialization.
788
edbba2ce
TS
789 * c-parser.c (c_parser_omp_target): Return bool values.
790
68c81f24
TS
7912014-05-22 Thomas Schwinge <thomas@codesourcery.com>
792
793 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
794 num_teams_loc variable to num_thread_limit_loc.
795
632f2871
RS
7962014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
797
798 * c-array-notation.c (expand_array_notations): Use void_node
799 instead of void_zero_node.
800
766090c2
TS
8012014-05-17 Trevor Saunders <tsaunders@mozilla.com>
802
803 * c-decl.c (finish_struct): Adjust.
804 (finish_enum): Likewise.
805 (bind): Adjust.
806 (record_inline_static): Likewise.
807 (push_scope): Likewise.
808 (make_label): Likewise.
809 (lookup_label_for_goto): Likewise.
810 (finish_struct): Likewise.
811 (finish_enum): Likewise.
812 (store_parm_decls): Likewise.
813 (c_push_function_context): Likewise.
814 * c-lang.h: Remove usage of variable_size gty attribute.
815 * c-parser.c (c_parse_init): Adjust.
816 (c_parse_file): Likewise.
817
2b107f6b
MP
8182014-05-13 Marek Polacek <polacek@redhat.com>
819
820 PR c/61162
821 * c-typeck.c (convert_for_assignment): Pass location to
822 WARN_FOR_ASSIGNMENT instead of input_location.
823
d033409e
MP
8242014-05-10 Marek Polacek <polacek@redhat.com>
825
826 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
827 maybe_warn_string_init.
828 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
829 maybe_warn_string_init.
830 * c-tree.h (maybe_warn_string_init): Update declaration.
831 * c-typeck.c (maybe_warn_string_init): Add location parameter.
832 Call pedwarn_init with loc instead of with input_location.
833 (digest_init): Pass init_loc to maybe_warn_string_init.
834 (pop_init_level): Call pedwarn_init with loc instead of with
835 input_location.
836 (set_init_index): Likewise.
837 (process_init_element): Likewise.
838
ea58ef42
MP
8392014-05-09 Marek Polacek <polacek@redhat.com>
840
841 PR c/61096
842 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
843 (c_parser_initelt): Pass location to set_init_label. Pass array index
844 location to set_init_index.
845 * c-tree.h (push_init_level): Update declaration.
846 (pop_init_level): Likewise.
847 (set_init_index): Likewise.
848 (set_init_label): Likewise.
849 * c-typeck.c (error_init): Add location parameter. Call error_at
850 instead of error.
851 (digest_init): Pass init_loc to error_init.
852 (really_start_incremental_init):
853 (push_init_level): Add location parameter. Pass loc to pop_init_level
854 and error_init.
855 (pop_init_level): Likewise.
856 (set_designator): Add location parameter. Pass loc to pop_init_level,
857 push_init_level, and error_init.
858 (set_init_index): Add location parameter. Pass loc to error_init and
859 set_designator.
860 (set_init_label): Likewise.
861 (output_init_element): Pass loc to error_init.
862 (process_init_element): Pass loc to error_init, pop_init_level,
863 pedwarn_init, and push_init_level.
864
661a0813
MP
8652014-05-09 Marek Polacek <polacek@redhat.com>
866
867 PR c/50459
868 * c-parser.c (c_parser_attributes): Parse the arguments as an
869 expression-list if the attribute takes identifier.
870
2793eeab
MP
8712014-05-08 Marek Polacek <polacek@redhat.com>
872
873 PR c/61053
874 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
875 TYPE_ALIGN_UNIT.
876
f827930a
MP
8772014-05-08 Marek Polacek <polacek@redhat.com>
878
879 PR c/61077
880 * c-decl.c (start_function): Warn for _Atomic-qualified return type
881 of main.
882
1d60af08
KZ
8832014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
884 Mike Stump <mikestump@comcast.net>
885 Richard Sandiford <rdsandiford@googlemail.com>
886
887 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
888 (finish_enum): Use wide-int interfaces.
889 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
890 * c-typeck.c (build_c_cast): Likewise.
891 (set_nonincremental_init_from_string): Likewise.
892 (c_tree_equal): Likewise.
893
a0e24419
MP
8942014-05-02 Marek Polacek <polacek@redhat.com>
895
896 PR c/25801
897 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
898 Return size_one_node when the type is not complete.
899 (pointer_diff): Remove comment.
900 (build_unary_op): Improve error messages.
901
19fc9faa
MP
9022014-05-02 Marek Polacek <polacek@redhat.com>
903
904 * c-typeck.c (c_finish_return): Separate warning_at calls.
905
63bc4e87
MP
9062014-05-02 Marek Polacek <polacek@redhat.com>
907
908 * c-tree.h (error_init): Remove declaration.
909 (pedwarn_init): Likewise.
910 * c-typeck.c (error_init): Make static and move above.
911 (pedwarn_init): Likewise.
912 (warning_init): Move above.
913 (maybe_warn_string_init): Likewise.
914
4bd2511b
JL
9152014-05-01 Jeff Law <law@redhat.com>
916
917 Revert:
918
919 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
920 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
921 avoid goto.
922
6a358dcb
MP
9232014-05-02 Marek Polacek <polacek@redhat.com>
924
925 PR c/60784
926 * c-typeck.c (push_init_level): Set constructor_designated to
927 p->designated for structures.
928
ae5ebda4
MP
9292014-05-01 Marek Polacek <polacek@redhat.com>
930
931 PR c/60915
932 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
933 function-definition has an attribute after the declarator.
934
96b40f8d
MP
9352014-05-01 Marek Polacek <polacek@redhat.com>
936
937 PR c/60257
938 * c-typeck.c (warning_init): Add location_t parameter. Call
939 warning_at instead of warning.
940 (push_init_level): Pass input_location to warning_init.
941 (add_pending_init): Add location_t parameter. Pass loc to
942 warning_init.
943 (set_nonincremental_init): Pass input_location to add_pending_init.
944 (set_nonincremental_init_from_string): Likewise.
945 (output_init_element): Pass loc to warning_init and to
946 add_pending_init.
947
32e00768
MP
9482014-05-01 Marek Polacek <polacek@redhat.com>
949
950 PR c/43395
951 * c-typeck.c (c_finish_return): Distinguish between label and variable
952 when warning about returning local address.
953
c9379ce2
MP
9542014-05-01 Marek Polacek <polacek@redhat.com>
955
956 PR c/29467
957 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
958 in C89 mode.
959
d00887e8
MP
9602014-05-01 Marek Polacek <polacek@redhat.com>
961
962 PR c/43245
963 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
964 instead of 0 to WARN_FOR_QUALIFIERS.
965
5436fa2e
MP
9662014-05-01 Marek Polacek <polacek@redhat.com>
967
968 PR c/56989
969 * c-typeck.c (default_conversion): Use better location for
970 error call.
971
f8ed5150
MP
9722014-04-30 Marek Polacek <polacek@redhat.com>
973
974 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
975 also when SANITIZE_FLOAT_DIVIDE is on.
976
8337d1db
MP
9772014-04-30 Marek Polacek <polacek@redhat.com>
978
979 PR c/60139
980 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
981 and pedwarn_init. Use loc insted of input_location.
982
c4bdc42f
MP
9832014-04-30 Marek Polacek <polacek@redhat.com>
984
985 PR c/60351
986 * c-typeck.c (build_binary_op): Use location when warning about
987 shift count.
988
45484dcf
MP
9892014-04-25 Marek Polacek <polacek@redhat.com>
990
991 PR c/18079
992 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
993 always_inline/noinline and hot/cold attributes.
994
34cf811f
MP
9952014-04-25 Marek Polacek <polacek@redhat.com>
996
997 PR c/60114
998 * c-parser.c (c_parser_initelt): Pass input_location to
999 process_init_element.
1000 (c_parser_initval): Pass loc to process_init_element.
1001 * c-tree.h (process_init_element): Adjust declaration.
1002 * c-typeck.c (push_init_level): Pass input_location to
1003 process_init_element.
1004 (pop_init_level): Likewise.
1005 (set_designator): Likewise.
1006 (output_init_element): Add location_t parameter. Pass loc to
1007 digest_init.
1008 (output_pending_init_elements): Pass input_location to
1009 output_init_element.
1010 (process_init_element): Add location_t parameter. Pass loc to
1011 output_init_element.
1012
42056eac
JJ
10132014-04-24 Jakub Jelinek <jakub@redhat.com>
1014
1015 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1016 atomic-clause, allow comma in between atomic-clause and
1017 seq_cst.
1018
e162a134
JJ
10192014-04-22 Jakub Jelinek <jakub@redhat.com>
1020
1021 PR c/59073
1022 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1023 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1024
2f6babac
IZ
10252014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1026
1027 PR middle-end/60469
1028 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1029 create_tmp_var instead build_decl for creating temps.
1030 (build_array_notation_expr): Likewise.
1031 (fix_conditional_array_notations_1): Likewise.
1032 (fix_array_notation_expr): Likewise.
1033 (fix_array_notation_call_expr): Likewise.
1034
8edbfaa6
JJ
10352014-03-28 Jakub Jelinek <jakub@redhat.com>
1036
1037 PR c++/60689
1038 * c-tree.h (c_build_function_call_vec): New prototype.
1039 * c-typeck.c (build_function_call_vec): Don't call
1040 resolve_overloaded_builtin here.
1041 (c_build_function_call_vec): New wrapper function around
1042 build_function_call_vec. Call resolve_overloaded_builtin here.
1043 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1044 Call c_build_function_call_vec instead of build_function_call_vec.
1045 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1046 * c-decl.c (finish_decl): Likewise.
1047
7485aeea
MLI
10482014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1049
1050 PR c/55383
1051 * c-typeck.c: Use correct format string in cast-qual warning
1052
b17a8b07
TS
10532014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1054
1055 * c-decl.c (c_decl_attributes): Use
1056 lang_hooks.types.omp_mappable_type.
1057 * c-typeck.c (c_finish_omp_clauses): Likewise.
1058
3af9c5e9
MP
10592014-03-06 Marek Polacek <polacek@redhat.com>
1060
1061 PR c/60197
1062 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1063 of checking tree code.
1064
1c9f5f33
PK
10652014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1066
1067 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1068 (c_parser_parameter_declaration): Likewise.
1069
cc28fc7f
MP
10702014-02-19 Marek Polacek <polacek@redhat.com>
1071
1072 PR c/60195
1073 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1074 Call mark_exp_read on exp.value.
1075 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1076 TREE_ADDRESSABLE on old instead of val.
1077 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1078
b581c05c
PK
10792014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1080
1081 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1082 C_EXPR_APPEND by vec_safe_push.
1083 * c-tree.h (C_EXPR_APPEND): Remove.
1084
81e5eca8
MP
10852014-01-31 Marek Polacek <polacek@redhat.com>
1086
1087 PR c/59963
1088 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1089 build_function_call_vec.
1090 (build_function_call): Likewise.
1091 (build_atomic_assign): Likewise.
1092 (build_function_call_vec): Add arg_loc parameter. Use it.
1093 (convert_arguments): Likewise.
1094 (convert_for_assignment): Rename rhs_loc to expr_loc.
1095 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1096 (c_parser_objc_keywordexpr): Likewise.
1097 (c_parser_postfix_expression_after_primary): Call
1098 build_function_call_vec with expr_loc rather than op_loc.
1099 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1100 build_function_call_vec.
1101 (c_parser_expr_list): Add locations parameter. Fill it with locations
1102 of function arguments.
1103 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1104
68fca595
MP
11052014-01-30 Marek Polacek <polacek@redhat.com>
1106
1107 PR c/59940
1108 * c-typeck.c (build_function_call_vec): Use loc parameter.
1109 (convert_arguments): Add location parameter. Use it.
1110 (ep_convert_and_check): Likewise.
1111 (build_atomic_assign): Adjust convert_for_assignment call.
1112 (build_modify_expr): Likewise.
1113 (digest_init): Likewise.
1114 (c_finish_return): Likewise.
1115 (build_conditional_expr): Adjust ep_convert_and_check calls.
1116 (convert_for_assignment): Add rhs_loc parameter. Use it.
1117 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1118 calls.
1119
fa337f3a
RB
11202014-01-30 Richard Biener <rguenther@suse.de>
1121
1122 PR c/59905
1123 * c-typeck.c (build_function_call_vec): Do not replace calls
1124 to a function via an incompatible type with a runtime abort.
1125
b72271b9
BI
11262014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1127
1128 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1129 flag_enable_cilkplus with flag_cilkplus.
1130 (c_parser_direct_declarator_inner): Likewise.
1131 (c_parser_attribute_any_word): Likewise.
1132 (c_parser_attributes): Likewise.
1133 (c_parser_compound_statement): Likewise.
1134 (c_parser_statement_after_labels): Likewise.
1135 (c_parser_if_statement): Likewise.
1136 (c_parser_switch_statement): Likewise.
1137 (c_parser_do_statement): Likewise.
1138 (c_parser_for_statement): Likewise.
1139 (c_parser_unary_expression): Likewise.
1140 (c_parser_postfix_expression): Likewise.
1141 (c_parser_postfix_expression_after_primary): Likewise.
1142 (c_parser_postfix_expression_after_primary): Likewise.
1143 (c_parser_omp_clause_name): Likewise.
1144 (c_finish_omp_declare_simd): Likewise.
1145 (c_parser_cilk_verify_simd): Likewise.
1146 * c-typeck.c (build_array_ref): Likewise.
1147 (build_function_call_vec): Likewise.
1148 (convert_arguments): Likewise.
1149 (build_compound_expr): Likewise.
1150 (c_finish_return): Likewise.
1151 (c_finish_if_stmt): Likewise.
1152 (c_finish_loop): Likewise.
1153 (build_binary_op): Likewise.
1154
393e8e8b
MP
11552014-01-23 Marek Polacek <polacek@redhat.com>
1156
1157 PR c/59846
1158 * c-typeck.c (parser_build_binary_op): Use location instead of
1159 input_location.
1160 (build_binary_op): Pass location to shorten_compare.
1161
f04dda30
MP
11622014-01-23 Marek Polacek <polacek@redhat.com>
1163
1164 PR c/58346
1165 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1166 an empty aggregate.
1167
789eadcd
MP
11682014-01-23 Marek Polacek <polacek@redhat.com>
1169
1170 PR c/59871
1171 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1172 of a comma expression.
1173 (emit_side_effect_warnings): Likewise.
1174
40f14e9f
BI
11752014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1176
1177 PR c/59825
1178 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1179 function to use walk_tree and moved a lot of its functionality to
1180 expand_array_notations.
1181 (expand_array_notations): New function.
1182
74558dd9
BI
11832014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1184
1185 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1186 attribute an attribute without value.
1187
652fea39
JJ
11882014-01-23 Jakub Jelinek <jakub@redhat.com>
1189
1190 PR middle-end/58809
1191 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1192 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1193
f34f1c87
MP
11942014-01-22 Marek Polacek <polacek@redhat.com>
1195
1196 PR c/59891
1197 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1198 of remove_c_maybe_const_expr on op1 and op2.
1199
241f845a
JJ
12002014-01-15 Jakub Jelinek <jakub@redhat.com>
1201
1202 PR c/58943
1203 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1204 effects, preevaluate rhs using SAVE_EXPR first.
1205
9a74f20c
BI
12062014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1207
1208 PR c++/59631
1209 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1210 statements with if-elseif statements.
1211
96066ce1
MP
12122014-01-06 Marek Polacek <polacek@redhat.com>
1213
1214 PR c/57773
1215 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1216 defined bit-field types only in ISO C.
1217
23a5b65a
RS
12182014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1219
1220 Update copyright years
1221
f9030485
RS
12222014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1223
1224 * c-array-notation.c: Use the standard form for the copyright notice.
1225
41958c28
BI
12262013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1227
1228 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1229 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1230 field in parser is not empty. If not-empty, call the function
1231 c_parser_finish_omp_declare_simd.
1232 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1233 between SIMD-enabled functions and #pragma simd. Added new parameter.
1234 (c_parser_cilk_all_clauses): Modified the usage of the function
1235 c_parser_cilk_clause_vectorlength as mentioned above.
1236 (c_parser_cilk_simd_fn_vector_attrs): New function.
1237 (c_finish_cilk_simd_fn_tokens): Likewise.
1238 (is_cilkplus_vector_p): Likewise.
1239 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1240 "nomask," and "mask" strings in clause name.
1241 (c_parser_omp_all_clauses): Added 3 new case statements:
1242 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1243 PRAGMA_CILK_CLAUSE_NOMASK.
1244 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1245 check for vector attribute and if so call the function
1246 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1247 called the function c_finish_cilk_simd_fn_tokens.
1248 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1249 parser field is non-empty. If so, parse them as you would parse
1250 the omp declare simd pragma.
1251 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1252 Added a check when step is a parameter and flag it as error.
1253 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1254 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1255 pragma_omp_clause.
1256
cef0fd0e
TS
12572013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1258
1259 * c-parser.c (c_parser_omp_parallel): Fix description.
1260
12893402
BI
12612013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1262
1263 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1264 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1265 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1266 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1267
296674db
JM
12682013-12-04 Joseph Myers <joseph@codesourcery.com>
1269
1270 PR c/52023
1271 * c-parser.c (c_parser_alignas_specifier): Use
1272 c_sizeof_or_alignof_type instead of c_alignof.
1273 (c_parser_alignof_expression): Likewise, with min_alignof
1274 parameter depending on alignof spelling used.
1275
edd28054
MP
12762013-12-04 Marek Polacek <polacek@redhat.com>
1277
1278 PR c/54113
1279 * c-decl.c (start_function): Don't warn for missing prototype for
1280 inline functions.
1281
da0fc454
MP
12822013-12-03 Marek Polacek <polacek@redhat.com>
1283
1284 PR c/59351
1285 * c-decl.c (build_compound_literal): Allow compound literals with
1286 empty initial value.
1287
4c2ecab0
JM
12882013-12-02 Joseph Myers <joseph@codesourcery.com>
1289
1290 PR c/58235
1291 * c-typeck.c (build_modify_expr): Diagnose assignment to
1292 expression with array type.
1293
340baef7
JM
12942013-11-29 Joseph Myers <joseph@codesourcery.com>
1295
1296 PR c/42262
1297 * c-typeck.c (process_init_element): Do not treat a string as
1298 initializing a whole array when used with a designator for an
1299 individual element.
1300
6763b9f7
JM
13012013-11-29 Joseph Myers <joseph@codesourcery.com>
1302
1303 PR c/57574
1304 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1305 an inline function following a static declaration.
1306
e7bd1de1
JJ
13072013-11-28 Jakub Jelinek <jakub@redhat.com>
1308
1309 PR c/59310
1310 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1311 to p_name before calling c_parser_omp_teams instead of after.
1312 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1313 argument. Remove unused p_name variable.
1314
0136f8f0
AH
13152013-11-27 Aldy Hernandez <aldyh@redhat.com>
1316 Jakub Jelinek <jakub@redhat.com>
1317
1318 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1319 external_scope is NULL.
1320
241b71bb
TV
13212013-11-27 Tom de Vries <tom@codesourcery.com>
1322 Marc Glisse <marc.glisse@inria.fr>
1323
1324 PR c++/59032
1325 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1326
2fb9a547
AM
13272013-11-22 Andrew MacLeod <amacleod@redhat.com>
1328
1329 * c-typeck.c: Add required include files from gimple.h.
1330
8400e75e
DM
13312013-11-22 David Malcolm <dmalcolm@redhat.com>
1332
1333 * c-decl.c (define_label, shadow_tag_warned)
1334 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1335 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1336 (declspecs_add_type): Remove use of in_system_header macro.
1337 * c-parser.c (c_parser_unary_expression): Likewise.
1338 * c-typeck.c (store_init_value, process_init_element)
1339 (c_start_case): Likewise.
1340
1341 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1342 macro.
1343
1344 * c-parser.c (c_parser_set_source_position_from_token): Remove
1345 reference to in_system_header from comment.
1346
386b1f1f
RS
13472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1348
1349 * c-decl.c (grokdeclarator): Update comment to refer to
1350 tree_to_[su]hwi rather than tree_low_cst.
1351
ae7e9ddd
RS
13522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1353
1354 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1355 tree_to_uhwi throughout.
1356
9439e9a1
RS
13572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1358
1359 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1360 throughout.
1361
9541ffee
RS
13622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1363
1364 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1365 throughout.
1366
c02065fc
AH
13672013-11-15 Aldy Hernandez <aldyh@redhat.com>
1368
1369 * c-parser.c (c_parser_cilk_simd): New.
1370 (c_parser_cilk_verify_simd): New.
1371 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1372 (c_parser_omp_for_loop): Add case for NE_EXPR.
1373 Set c_break_label for CILK_SIMD.
1374 (c_parser_cilk_clause_vectorlength): New.
1375 (c_parser_cilk_clause_linear): New.
1376 (c_parser_cilk_clause_name): New.
1377 (c_parser_cilk_all_clauses): New.
1378 * c-typeck.c (build_unary_op): Pass location argument to
1379 readonly_error.
1380 (build_modify_expr): Same.
1381 (build_asm_expr): Same.
1382 (c_finish_bc_stmt): Error on break/continue in loops.
1383
18f429e2
AM
13842013-11-14 Andrew MacLeod <amacleod@redhat.com>
1385
1386 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1387
d8a2d370
DN
13882013-11-14 Diego Novillo <dnovillo@google.com>
1389
1390 * c-decl.c: Include print-tree.h.
1391 Include stor-layout.h.
1392 Include varasm.h.
1393 Include attribs.h.
1394 Include stringpool.h.
1395 * c-lang.c: Include fold-const.h.
1396 * c-parser.c: Include stringpool.h.
1397 Include attribs.h.
1398 Include stor-layout.h.
1399 Include varasm.h.
1400 Include trans-mem.h.
1401 * c-typeck.c: Include stor-layout.h.
1402 Include trans-mem.h.
1403 Include varasm.h.
1404 Include stmt.h.
1405
38b7bc7f
JM
14062013-11-13 Joseph Myers <joseph@codesourcery.com>
1407
1408 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1409 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1410 __auto_type.
1411 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1412 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1413 RID_AUTO_TYPE.
1414 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1415 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1416 (c_parser_declarator, c_parser_direct_declarator_inner)
1417 (c_parser_parameter_declaration, c_parser_type_name): All callers
1418 changed.
1419 (c_parser_declaration_or_fndef): Handle declarations with type
1420 determined from the initializer.
1421
45b0be94
AM
14222013-11-12 Andrew MacLeod <amacleod@redhat.com>
1423
18f429e2 1424 * c-typeck.c: Include gimplify.h.
45b0be94 1425
582d9b50
JM
14262013-11-12 Joseph Myers <joseph@codesourcery.com>
1427
1428 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1429 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1430 comment.
1431 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1432 or _Thread_local as appropriate in diagnostics.
1433 (build_null_declspecs): Initialize ret->thread_gnu_p.
1434 (declspecs_add_scspec): Handle either __thread or _Thread_local
1435 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1436 pedantic. Do not disallow _Thread_local extern and _Thread_local
1437 static.
1438
267bac10
JM
14392013-11-07 Joseph Myers <joseph@codesourcery.com>
1440 Andrew MacLeod <amacleod@redhat.com>
1441
1442 * c-aux-info.c (gen_type): Handle atomic qualifier.
1443 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1444 qualifiers when compating types.
1445 (shadow_tag_warned): Handle atomic_p in declspecs.
1446 (quals_from_declspecs): Likewise.
1447 (start_decl): Use c_type_promotes_to when promoting argument
1448 types.
1449 (grokdeclarator): Handle _Atomic.
1450 (get_parm_info): Diagnose any qualifier on "void" as only
1451 parameter.
1452 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1453 comparing types. Use c_type_promotes_to when promoting argument
1454 types.
1455 (finish_function): Use c_type_promotes_to when promoting argument
1456 types.
1457 (build_null_declspecs): Handle atomic_p in declspecs.
1458 (declspecs_add_qual): Handle RID_ATOMIC.
1459 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1460 (c_token_starts_declspecs): Handle RID_ATOMIC.
1461 (c_parser_declspecs): Handle atomic type specifiers and
1462 qualifiers.
1463 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1464 from types of expressions with atomic type.
1465 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1466 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1467 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1468 (c_parser_statement_after_labels, c_parser_switch_statement)
1469 (c_parser_for_statement, c_parser_expr_no_commas)
1470 (c_parser_conditional_expression, c_parser_binary_expression)
1471 (c_parser_cast_expression, c_parser_unary_expression)
1472 (c_parser_postfix_expression)
1473 (c_parser_postfix_expression_after_primary, c_parser_expression):
1474 Use convert_lvalue_to_rvalue.
1475 (c_parser_expression_conv, c_parser_expr_list): Document
1476 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1477 (c_parser_objc_synchronized_statement): Use
1478 convert_lvalue_to_rvalue.
1479 (c_parser_objc_selector): Handle RID_ATOMIC.
1480 (c_parser_objc_receiver, c_parser_array_notation): Use
1481 convert_lvalue_to_rvalue.
1482 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1483 _Atomic (type-name).
1484 (struct c_declspecs): Add atomic_p field.
1485 (convert_lvalue_to_rvalue): Declare.
1486 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1487 corresponding atomic types.
1488 (qualify_type): Don't add _Atomic qualifiers from second argument.
1489 (comp_target_types): Do not allow _Atomic mismatches.
1490 (type_lists_compatible_p): Do not remove atomic qualifiers when
1491 comparing types.
1492 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1493 (build_atomic_assign): New functions.
1494 (build_unary_op): Use build_atomic_assign for atomic increment and
1495 decrement.
1496 (build_conditional_expr): Do not treat _Atomic void as a qualified
1497 version of void.
1498 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1499 (find_anonymous_field_with_type, convert_to_anonymous_field)
1500 (convert_for_assignment): Do not remove atomic qualifiers when
1501 comparing types.
1502 (digest_init): Do not accept initialization of arrays of atomic
1503 elements by string constants.
1504 (build_asm_expr): Use convert_lvalue_to_rvalue.
1505 (build_binary_op): Do not treat _Atomic void as a qualified
1506 version of void.
1507
0c249d4b
DD
15082013-11-06 DJ Delorie <dj@redhat.com>
1509
1510 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1511 both explicit and builtin, print the location of the explicit one.
1512
6d7f7e0a
TB
15132013-11-05 Tobias Burnus <burnus@net-b.de>
1514
1515 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1516 c_parser_omp_distribute, c_parser_omp_teams,
1517 c_parser_omp_target, c_parser_omp_declare): Handle
1518 -fopenmp-simd.
1519
b906f4ca
MP
15202013-11-03 Marek Polacek <polacek@redhat.com>
1521
1522 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1523
ee1d5a02
JJ
15242013-11-01 Jakub Jelinek <jakub@redhat.com>
1525
1526 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1527 check_dup_generic at the end, unless remove is true.
1528 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1529 remove = true;.
1530 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1531
5a9785fb
JJ
15322013-10-31 Jakub Jelinek <jakub@redhat.com>
1533
1534 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1535 with decl that is not pointer nor array.
1536
939b37da
BI
15372013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1538
1539 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1540 a spawning function is found.
1541 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1542 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1543 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1544 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1545 case.
1546 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1547 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1548 expr.
1549 (c_finish_return): Added a check to reject _Cilk_spawn in return
1550 expression.
1551 (build_cilk_spawn): New function.
1552 (build_cilk_sync): Likewise.
1553 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1554
d4af74d4
TB
15552013-10-27 Tobias Burnus <burnus@net-b.de>
1556
1557 PR other/33426
1558 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1559 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1560 (c_parser_statement_after_labels): Update calls.
1561
d73749df 15622013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1563
1564 PR other/33426
1565 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1566 Handle PRAGMA_IVDEP.
1567 (c_parser_statement_after_labels): Update call.
1568
f28aa681
MP
15692013-10-24 Marek Polacek <polacek@redhat.com>
1570
1571 * c-parser.c (c_parser_struct_declaration): Add a comment.
1572 (c_parser_declarator): Don't allow _Alignas here.
1573
0645c1a2
AM
15742013-10-17 Andrew MacLeod <amacleod@redhat.com>
1575
1576 * c-parser.c: Include omp-low.h.
1577 * c-typeck.c: Likewise.
1578
568a31f2
MP
15792013-10-17 Marek Polacek <polacek@redhat.com>
1580
1581 PR c/58267
1582 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1583 Document syntax of the array-declarator.
1584 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1585 are not permitted.
1586 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1587 (c_parser_struct_declaration): Likewise.
1588 (c_parser_declarator): Likewise.
1589 (c_parser_direct_declarator_inner): Likewise.
1590 (c_parser_parameter_declaration): Likewise.
1591 (c_parser_type_name): Likewise.
1592
acf0174b
JJ
15932013-10-11 Jakub Jelinek <jakub@redhat.com>
1594
1595 * c-lang.h (current_omp_declare_target_attribute): New extern
1596 decl.
1597 * c-parser.c: Include c-lang.h.
1598 (struct c_parser): Change tokens to c_token *.
1599 Add tokens_buf field. Change tokens_avail type to unsigned int.
1600 (c_parser_consume_token): If parser->tokens isn't
1601 &parser->tokens_buf[0], increment parser->tokens.
1602 (c_parser_consume_pragma): Likewise.
1603 (enum pragma_context): Add pragma_struct and pragma_param.
1604 (c_parser_external_declaration): Adjust
1605 c_parser_declaration_or_fndef caller.
1606 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1607 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1608 Adjust recursive call.
1609 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1610 of pragma_external.
1611 (c_parser_parameter_declaration): Use pragma_param instead of
1612 pragma_external.
1613 (c_parser_compound_statement_nostart, c_parser_label,
1614 c_parser_for_statement): Adjust
1615 c_parser_declaration_or_fndef callers.
1616 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1617 it through to c_parser_conditional_expression.
1618 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1619 pass it through to c_parser_binary_expression. Adjust recursive
1620 call.
1621 (c_parser_binary_expression): Remove prec argument, add
1622 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1623 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1624 binop matches it, use build2 instead of parser_build_binary_op.
1625 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1626 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1627 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1628 Handle pragma_struct and pragma_param the same as pragma_external.
1629 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1630 (c_parser_omp_variable_list): Parse array sections for
1631 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1632 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1633 (c_parser_omp_clause_reduction): Handle user defined reductions.
1634 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1635 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1636 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1637 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1638 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1639 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1640 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1641 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1642 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1643 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1644 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1645 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1646 (c_parser_omp_for_loop): Add CODE argument, pass it through
1647 to c_finish_omp_for. Change last argument to cclauses,
1648 and adjust uses to grab parallel clauses from the array of all
1649 the split clauses. Adjust c_parser_binary_expression,
1650 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1651 (omp_split_clauses): New function.
1652 (c_parser_omp_simd): New function.
1653 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1654 Allow the function to be called also when parsing combined constructs,
1655 and call c_parser_omp_simd when parsing for simd.
1656 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1657 #pragma omp section, require exactly one structured-block instead of
1658 sequence of statements.
1659 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1660 Allow the function to be called also when parsing combined constructs.
1661 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1662 Allow the function to be called also when parsing combined
1663 constructs.
1664 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1665 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1666 c_parser_omp_teams, c_parser_omp_target_data,
1667 c_parser_omp_target_update, c_parser_omp_target,
1668 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1669 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1670 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1671 (c_parser_omp_construct): Add p_name and mask vars. Handle
1672 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1673 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1674 and c_parser_omp_sections callers.
1675 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1676 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1677 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1678 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1679 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1680 OMP_CLAUSE_DEPEND.
1681 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1682 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1683 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1684 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1685 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1686 * c-typeck.c: Include tree-inline.h.
1687 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1688 handle_omp_array_sections_1, handle_omp_array_sections,
1689 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1690 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1691 user defined reductions.
1692 (c_tree_equal): New function.
1693 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1694 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1695 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1696 c_check_omp_declare_reduction_r): New prototypes.
1697 * c-decl.c (current_omp_declare_target_attribute): New variable.
1698 (c_decl_attributes): New function.
1699 (start_decl, start_function): Use it instead of decl_attributes.
1700 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1701 c_omp_reduction_decl, c_omp_reduction_lookup,
1702 c_check_omp_declare_reduction_r): New functions.
1703
0a6c2227
TT
17042013-09-25 Tom Tromey <tromey@redhat.com>
1705
1706 * Make-lang.in (c/gccspec.o): Remove.
1707 (CFLAGS-c/gccspec.o): New variable.
1708 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1709 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1710 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1711
f3bc55f0
TT
17122013-09-25 Tom Tromey <tromey@redhat.com>
1713
1714 * Make-lang.in (c/gccspec.o): Don't use subshell.
1715
a24d975c
MP
17162013-09-18 Marek Polacek <polacek@redhat.com>
1717
1718 PR sanitize/58443
1719 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1720 Remove unnecessary check.
1721
ce6923c5
MP
17222013-09-18 Marek Polacek <polacek@redhat.com>
1723
1724 PR sanitizer/58411
1725 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1726 no_sanitize_undefined attribute.
1727
a1e51df9
KT
17282013-09-13 Kai Tietz <ktietz@redhat.com>
1729
1730 PR target/57848
1731 * c-decl.c (c_builtin_function_ext_scope): Remove
1732 wrong assumption that it is never called on prexisting
1733 symbol.
1734
0af94e6f
JR
17352013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1736
1737 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1738
20059c8b
GDR
17392013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1740
1741 * c-objc-common.c (c_tree_printer): Tidy.
1742
de5a5fa1
MP
17432013-08-30 Marek Polacek <polacek@redhat.com>
1744
1745 * c-typeck.c (build_binary_op): Add division by zero and shift
1746 instrumentation.
1747
2531a1d9 17482013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1749 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1750
6e2bcc98 1751 PR c/35649
2531a1d9
JR
1752 * c-typeck.c (c_common_type): Prefer double_type_node over
1753 other REAL_TYPE types with the same precision.
1754 (convert_arguments): Likewise.
1755
025311c4
GDR
17562013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1757
1758 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1759 (c_initialize_diagnostics): Call a destructor for the early printer.
1760
da6ca2b5
GDR
17612013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1762
1763 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1764 printer initialization.
1765
318cda85 17662013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1767
318cda85
BI
1768 PR c/57490
1769 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1770 check for truth values.
1771 (expand_array_notation_exprs): Added truth values case. Removed an
1772 unwanted else. Added for-loop to walk through subtrees in default
1773 case.
1774
b066401f
GDR
17752013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1776
1777 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1778
fb48aadc
JM
17792013-07-23 Joseph Myers <joseph@codesourcery.com>
1780
1781 * c-parser.c (struct c_generic_association): Fix typo.
1782
433cc7b0
TT
17832013-07-23 Tom Tromey <tromey@redhat.com>
1784 Joseph Myers <joseph@codesourcery.com>
1785
1786 * c-parser.c (struct c_generic_association): New.
1787 (c_generic_association_d): New typedef.
1788 (c_parser_generic_selection): New function.
1789 (c_parser_postfix_expression): Handle RID_GENERIC.
1790
26d40c3d
JM
17912013-07-13 Jason Merrill <jason@redhat.com>
1792
1793 PR c++/57793
1794 * c-decl.c (finish_struct): Check for too-large class.
1795
ecdbd01a 17962013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
1797
1798 PR c/57821
1799 * c-typeck.c (set_init_index): When folding, check for index overflow.
1800
1141ed3f
BI
18012013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1802
1803 * c-parser.c (c_parser_array_notation): Removed rejection of array
1804 notations in an array of function pointers.
1805
713b46fa
BI
18062013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1807
1808 * c-array-notation.c (make_triplet_val_inv): New function.
1809 (create_cmp_incr): Likewise.
1810 (create_array_refs): Likewise.
1811 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1812 Also modularized common parts between functions and called the function.
1813 (build_array_notation_expr): Likewise.
1814 (fix_conditional_array_notations_1): Likewise.
1815 (fix_array_notation_expr): Likewise.
1816 (fix_array_notation_call_expr): Likewise.
1817
92f20202
MP
18182013-06-18 Marek Polacek <polacek@redhat.com>
1819
1820 PR c/57630
1821 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1822
73a23b06
BI
18232013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1824
1825 * c-array-notation.c (build_array_notation_expr): Reject array notation
1826 mismatch between LHS and RHS even inside a call_expr. Also, removed
1827 a couple while statements that were dead code.
1828
00b8517d
BI
18292013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1830
1831 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1832 excessive precision expressions in function parameters. Also removed
1833 couple unwanted while statements.
1834
1509bdda
BI
18352013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1836
1837 * c-array-notation.c (expand_array_notation_exprs): Added
1838 ARRAY_NOTATION_REF case.
1839
d60f1706
BI
18402013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1841
1842 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1843 function to c-family/array-notation-common.c.
1844 (is_cilkplus_reduce_builtin): Likewise.
1845 (find_rank): Likewise.
1846 (extract_array_notation_exprs): Likewise.
1847 (replace_array_notations): Likewise.
1848 (find_inv_trees): Likewise.
1849 (replace_inv_trees): Likewise.
1850 (contains_array_notation_expr): Likewise.
1851 (find_correct_array_notation_type): Likewise.
1852 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1853 (struct inv_list): Moved this to c-family/array-notation-common.c.
1854 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1855
6d6efbb3
BI
18562013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1857
1858 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1859 reduction functions outside the for-loop. Added a check if the fundecl
1860 is non-NULL. Finally, removed an unwanted if-statement, and made the
1861 body unconditional.
1862
25c22937
BI
18632013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1864
1865 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1866 condition of the if-statement matches the rank of else-block and then-
1867 block when array notations are used.
1868 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1869 expression after the entire function body is parsed.
1870 (c_parser_expr_no_commas): Delayed creating array notation expressions
1871 to the end of function parsing.
1872 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1873 whole if-statement instead of just the condition.
1874 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1875
edd25645
BI
18762013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1877
1878 PR c/57474
1879 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1880 array to NULL_TREE if they are unused. Also added a check for the
1881 field to be NULL before its fields are used in future.
1882
065ce7f1
RO
18832013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1884
1885 PR bootstrap/57450
1886 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1887 (build_array_notation_expr): Likewise.
1888
36536d79
BI
18892013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1890
1891 * c-typeck.c (build_array_ref): Added a check to see if array's
1892 index is greater than one. If true, then emit an error.
1893 (build_function_call_vec): Exclude error reporting and checking
1894 for builtin array-notation functions.
1895 (convert_arguments): Likewise.
1896 (c_finish_return): Added a check for array notations as a return
1897 expression. If true, then emit an error.
1898 (c_finish_loop): Added a check for array notations in a loop
1899 condition. If true then emit an error.
1900 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1901 (build_binary_op): Added a check for array notation expr inside
1902 op1 and op0. If present, we call another function to find correct
1903 type.
1904 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1905 * c-parser.c (c_parser_compound_statement): Check if array
1906 notation code is used in tree, if so, then transform them into
1907 appropriate C code.
1908 (c_parser_expr_no_commas): Check if array notation is used in LHS
1909 or RHS, if so, then build array notation expression instead of
1910 regular modify.
1911 (c_parser_postfix_expression_after_primary): Added a check for
1912 colon(s) after square braces, if so then handle it like an array
1913 notation. Also, break up array notations in unary op if found.
1914 (c_parser_direct_declarator_inner): Added a check for array
1915 notation.
1916 (c_parser_compound_statement): Added a check for array notation in
1917 a stmt. If one is present, then expand array notation expr.
1918 (c_parser_if_statement): Likewise.
1919 (c_parser_switch_statement): Added a check for array notations in
1920 a switch statement's condition. If true, then output an error.
1921 (c_parser_while_statement): Similarly, but for a while.
1922 (c_parser_do_statement): Similarly, but for a do-while.
1923 (c_parser_for_statement): Similarly, but for a for-loop.
1924 (c_parser_unary_expression): Check if array notation is used in a
1925 pre-increment or pre-decrement expression. If true, then expand
1926 them.
1927 (c_parser_array_notation): New function.
1928 * c-array-notation.c: New file.
1929 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1930
cd192ccc
MS
19312013-05-23 Mike Stump <mikestump@comcast.net>
1932
1933 * c-typeck.c (convert_for_assignment): Handle references to memory
1934 spaces better.
1935
427b248d
JM
19362013-05-16 Jason Merrill <jason@redhat.com>
1937
1938 * Make-lang.in (cc1$(exeext)): Use link mutex.
1939
44d90fe1
PC
19402013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1941
1942 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1943 to simply use OPT_Wpointer_arith.
1944 (build_unary_op): Likewise.
1945
4e7d7b3d
JJ
19462013-04-03 Jakub Jelinek <jakub@redhat.com>
1947
1948 PR c/19449
1949 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1950 argument. If set, or it temporarily for parsing of the first
1951 argument into force_folding_builtin_constant_p.
1952 (c_parser_postfix_expression): Adjust callers.
1953
839b422f
RB
19542013-03-21 Richard Biener <rguenther@suse.de>
1955
1956 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1957 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1958
2ee028f1
MP
19592013-02-12 Marek Polacek <polacek@redhat.com>
1960
1961 PR c/44938
1962 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1963 origtypes to NULL.
1964
8824edff
JJ
19652013-01-24 Jakub Jelinek <jakub@redhat.com>
1966
1967 PR c/56078
1968 * c-typeck.c (set_nonincremental_init_from_string): If
1969 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1970 returned false.
1971 (process_init_element): Likewise.
1972
eadd3d0d
JJ
19732012-12-20 Jakub Jelinek <jakub@redhat.com>
1974
1975 PR c++/55619
1976 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1977 argument, don't call default_function_array_conversion
1978 nor c_fully_fold here.
1979 (c_parser_asm_statement): Adjust callers.
1980 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1981 and outputs here, and call default_function_array_conversion
1982 on inputs that don't need to be addressable.
1983
f8a93a2e
JJ
19842012-12-18 Jakub Jelinek <jakub@redhat.com>
1985
1986 PR c/39464
1987 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1988 warning require that both c_common_unsigned_type as well as
1989 c_common_signed_type is the same for both mvl and mvr types.
1990
9771b263
DN
19912012-11-16 Diego Novillo <dnovillo@google.com>
1992
1993 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1994
1995 * c-common.c: Use new vec API in vec.h.
1996 * c-common.h: Likewise.
1997 * c-gimplify.c: Likewise.
1998 * c-pragma.c: Likewise.
1999 * c-pretty-print.c: Likewise.
2000 * c-pretty-print.h: Likewise.
2001 * c-semantics.c: Likewise.
2002 * c-decl.c: Likewise.
2003 * c-parser.c: Likewise.
2004 * c-tree.h: Likewise.
2005 * c-typeck.c: Likewise.
2006
880661a4
JW
20072012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2008
2009 PR c++/54930
2010 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2011
077d1abe
MLI
20122012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2013
2014 PR c/53066
2015 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2016 shadows a function, unless the variable is a function or a
2017 pointer-to-function.
2018
3a785c97
JJ
20192012-10-12 Jakub Jelinek <jakub@redhat.com>
2020
2021 PR c/54381
2022 * c-parser.c (struct c_tree_loc_pair): Removed.
2023 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2024 add location_t * and tree * arguments, fill in array of 3
2025 sizeof_arg trees and corresponding locs.
2026 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2027 c_parser_expr_list callers.
2028 (c_parser_postfix_expression_after_primary): Likewise. Pass
2029 array of 3 sizeof_arg trees and locs (corresponding to first
2030 3 arguments) to sizeof_pointer_memaccess_warning.
2031
703c8606
LC
20322012-10-09 Lawrence Crowl <crowl@google.com>
2033
2034 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2035 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2036 hash table.
2037
5d9de0d0
PC
20382012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2039
2040 PR c++/54194
2041 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2042 call.
2043
a212e43f
MG
20442012-10-09 Marc Glisse <marc.glisse@inria.fr>
2045
2046 PR c++/54427
2047 * c-typeck.c: Include c-common.h.
2048 (enum stv_conv): Moved to c-common.h.
2049 (scalar_to_vector): Moved to c-common.c.
2050 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2051 * Make-lang.in: c-typeck.c depends on c-common.h.
2052
3b78de56
AC
20532012-10-04 Arnaud Charlet <charlet@adacore.com>
2054
2055 * c-decl.c (c_write_global_declarations): Fix handling of
2056 -fdump-ada-spec*.
2057
78c60e3d
SS
20582012-09-30 Sharad Singhai <singhai@google.com>
2059
2060 * c-decl.c (c_write_global_declarations): Use a different method
2061 to determine if the dump has ben initialized.
2062
9f33203d
JM
20632012-09-14 Joseph Myers <joseph@codesourcery.com>
2064
2065 PR c/54552
2066 * c-typeck.c (c_cast_expr): When casting to a type requiring
2067 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2068 c_fully_fold first.
2069
a27d595d
JM
20702012-09-14 Joseph Myers <joseph@codesourcery.com>
2071
2072 PR c/54103
2073 * c-typeck.c (build_unary_op): Pass original argument of
2074 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2075 any C_MAYBE_CONST_EXPR, if it has integer operands.
2076 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2077 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2078 to c_objc_common_truthvalue_conversion, then remove any
2079 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2080 c_objc_common_truthvalue_conversion not
2081 c_common_truthvalue_conversion.
2082 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2083 call note_integer_operands for arguments with integer operands
2084 that are not integer constants.
2085
9feb29df
JJ
20862012-09-13 Jakub Jelinek <jakub@redhat.com>
2087
2088 PR c/54559
2089 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2090 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2091
d409320c
JJ
20922012-08-31 Jakub Jelinek <jakub@redhat.com>
2093
2094 PR c/54428
2095 * c-convert.c (convert): Don't call fold_convert_loc if
2096 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2097 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2098 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2099
6265d07c
JJ
21002012-08-24 Jakub Jelinek <jakub@redhat.com>
2101
2102 PR c/54355
2103 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2104 for nested and empty_ok arguments in the call to
2105 c_parser_declaration_or_fndef.
2106
1a4049e7
JJ
21072012-08-17 Jakub Jelinek <jakub@redhat.com>
2108
2109 * c-tree.h (c_last_sizeof_arg): Declare.
2110 * c-parser.c (struct c_tree_loc_pair): New type.
2111 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2112 non-NULL.
2113 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2114 (c_parser_postfix_expression_after_primary): Likewise. Call
2115 sizeof_pointer_memaccess_warning if needed.
2116 (sizeof_ptr_memacc_comptypes): New function.
2117 * c-typeck.c (c_last_sizeof_arg): New global variable.
2118 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2119
0229aee9
UB
21202012-07-24 Uros Bizjak <ubizjak@gmail.com>
2121
2122 * c-lang.h (lang_decl): Add variable_size GTY option.
2123
7ee2468b
SB
21242012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2125
2126 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2127 * Make-lang.in: Fix dependencies.
2128
d4a10d0a
SB
21292012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2130
2131 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2132 and add language Makefile hooks.
2133 * config-lang.in: New file.
2134 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2135 add the required "normal" config-lang.in rules.
2136 * c-lang.h: Moved from gcc/ to here.
2137 * c-tree.h: Likewise.
2138 * c-objc-common.c: Likewise.
2139 * c-objc-common.h: Likewise.
2140 * c-typeck.c: Likewise.
2141 * c-convert.c: Likewise.
2142 * c-lang.c: Likewise.
2143 * c-aux-info.c: Likewise.
2144 * c-errors.c: Likewise.
2145 * gccspec.c: Likewise.
2146 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2147 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2148\f
5624e564 2149Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2150
2151Copying and distribution of this file, with or without modification,
2152are permitted in any medium without royalty provided the copyright
2153notice and this notice are preserved.