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