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