]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
[simplify-rtx][2/2] Simplify - (y ? -x : x) -> (!y ? -x : x)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
1eacc14a 12015-07-09 Andrew MacLeod <amacleod@redhat.com>
2
3 * c-array-notation.c: Adjust includes for flags.h changes.
4 * c-objc-common.c: Likewise.
5
9ef16211 62015-07-07 Andrew MacLeod <amacleod@redhat.com>
7
8 * c-array-notation.c: Adjust includes.
9 * c-aux-info.c: Likewise.
10 * c-convert.c: Likewise.
11 * c-decl.c: Likewise.
12 * c-errors.c: Likewise.
13 * c-lang.c: Likewise.
14 * c-objc-common.c: Likewise.
15 * c-parser.c: Likewise.
16 * c-typeck.c: Likewise.
17
0949f227 182015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
19
20 PR fortran/66605
21 * c-decl.c (finish_function): Call do_warn_unused_parameter.
22
be23b16f 232015-06-29 Marek Polacek <polacek@redhat.com>
24
25 PR c/66322
26 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
27 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
28 about -Wswitch-bool here.
29 (do_case): Update c_add_case_label call.
30 (c_finish_case): Update c_do_switch_warnings call.
31
6290f0db 322015-06-27 Marek Polacek <polacek@redhat.com>
33
34 * c-typeck.c: Use VECTOR_TYPE_P throughout.
35
aa3e402e 362015-06-26 Marek Polacek <polacek@redhat.com>
37
38 * c-array-notation.c (fix_builtin_array_notation_fn): Use
39 INDIRECT_REF_P.
40 * c-typeck.c (array_to_pointer_conversion): Likewise.
41 (build_unary_op): Likewise.
42 (c_finish_return): Likewise.
43
ec2e0095 442015-06-25 Andrew MacLeod <amacleod@redhat.com>
45
46 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
47 * c-parser.c: Likewise.
48
770ff93b 492015-06-25 Richard Sandiford <richard.sandiford@arm.com>
50
51 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
52 instead of pointer_hash.
53 (detect_field_duplicates): Likewise.
54
f48c7f4a 552015-06-25 Marek Polacek <polacek@redhat.com>
56
57 * c-array-notation.c: Use VAR_P throughout.
58 * c-decl.c: Likewise.
59 * c-objc-common.c: Likewise.
60 * c-parser.c: Likewise.
61 * c-typeck.c: Likewise.
62
ce41e81a 632015-06-25 Marek Polacek <polacek@redhat.com>
64
65 * c-decl.c: Use is_global_var throughout.
66 * c-parser.c: Likewise.
67 * c-typeck.c: Likewise.
68
f2ab3bac 692015-06-17 Andrew MacLeod <amacleod@redhat.com>
70
71 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
72 * c-aux-info.c: Likewise.
73 * c-convert.c: Likewise.
74 * c-decl.c: Likewise.
75 * c-errors.c: Likewise.
76 * c-lang.c: Likewise.
77 * c-objc-common.c: Likewise.
78 * c-parser.c: Likewise.
79 * c-typeck.c: Likewise.
80
647730ab 812015-06-11 Jan Hubicka <hubicka@ucw.cz>
82
83 PR middle-end/66325
84 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
85 variants.
86
dd4b0a0d 872015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
88
89 * c-decl.c (pop_scope): Register the main translation unit
90 through the new debug hook.
91
64486212 922015-06-08 Andrew MacLeod <amacleod@redhat.com>
93
94 * c-array-notation.c : Adjust include files.
95 * c-aux-info.c : Likewise.
96 * c-convert.c : Likewise.
97 * c-decl.c : Likewise.
98 * c-errors.c : Likewise.
99 * c-lang.c : Likewise.
100 * c-lang.h : Likewise.
101 * c-objc-common.c : Likewise.
102 * c-parser.c : Likewise.
103 * c-typeck.c : Likewise.
104
3a1c9df2 1052015-06-05 Aldy Hernandez <aldyh@redhat.com>
106
107 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
108 immediately clobber it.
109 (c_write_global_declarations_1): Remove call to
110 check_global_declaration_1.
111 (c_write_global_declarations_2): Remove.
112 (c_write_final_cleanups): Rename from c_write_global_declarations.
113 Remove call to finalize_compilation_unit.
114 Remove calls to debugging hooks.
115 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
116 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
117 * c-tree.h: Remove c_write_global_declarations.
118
f77c0292 1192015-06-04 Andrew MacLeod <amacleod@redhat.com>
120
121 * c-array-notation.c: Adjust includes for restructured coretypes.h.
122 * c-aux-info.c: Likewise.
123 * c-convert.c: Likewise.
124 * c-decl.c: Likewise.
125 * c-errors.c: Likewise.
126 * c-lang.c: Likewise.
127 * c-objc-common.c: Likewise.
128 * c-parser.c: Likewise.
129 * c-typeck.c: Likewise.
130
b44134dc 1312015-06-04 Marek Polacek <polacek@redhat.com>
132
133 PR c/66341
134 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
135 it is a lvalue.
136
d1df0bfc 1372015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
138
139 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
140 Warn for empty struct.
141 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
142
f8363c5d 1432015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
144
145 * c-decl.c (start_function): Call plugin before parsing.
146 (finish_function): Call plugin after parsing.
147
5b9761f5 1482015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
149
150 PR c/49551
151 * c-decl.c (merge_decls): Merge DECL_COMMON.
152
eeec71b4 1532015-05-22 Jim Wilson <jim.wilson@linaro.org>
154
155 * Make-lang.in (check_gcc_pallelize): Define.
156
5a4c69dd 1572015-05-22 Marek Polacek <polacek@redhat.com>
158
159 PR c/47043
160 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
161 attributes.
162
5650b4ff 1632015-05-21 Marek Polacek <polacek@redhat.com>
164
165 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
166 DECL_BUILT_IN.
167
b443c459 1682015-05-20 Marek Polacek <polacek@redhat.com>
169
170 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
171 * c-typeck.c: Likewise.
172
9e73638f 1732015-05-19 Marek Polacek <polacek@redhat.com>
174
175 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
176
d7729e26 1772015-05-19 Jakub Jelinek <jakub@redhat.com>
178
179 PR middle-end/66199
180 * c-parser.c (c_parser_omp_for_loop): Don't add
181 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
182 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
183 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
184 constructs.
185
dfcf26a5 1862015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
187
188 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
9e73638f 189 swaps.
dfcf26a5 190
09172322 1912015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
192
193 PR fortran/44054
194 * c-objc-common.c (c_tree_printer): Replace locus pointer with
195 accessor function.
196
aac24642 1972015-05-14 Marek Polacek <polacek@redhat.com>
198
199 PR c/66066
200 PR c/66127
201 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
202 rather than with 0.
203
e5f01cba 2042015-05-12 David Malcolm <dmalcolm@redhat.com>
205
206 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
207 to add a call to warn_for_misleading_indentation.
208 (c_parser_else_body): Likewise, adding param "else_loc".
209 (c_parser_if_statement): Check for misleading indentation.
210 (c_parser_while_statement): Likewise.
211 (c_parser_for_statement): Likewise.
212
dc5945dc 2132015-05-08 Marek Polacek <polacek@redhat.com>
214
215 PR c/64918
216 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
217 (output_init_element): Likewise.
218
cdc64059 2192015-05-07 Marek Polacek <polacek@redhat.com>
220
221 PR c/65179
222 * c-typeck.c (build_binary_op): Warn when left shifting a negative
223 value.
224
6fa7118e 2252015-04-30 Marek Polacek <polacek@redhat.com>
226
227 * c-typeck.c (set_init_label): Call error_at instead of error and
228 pass LOC to it.
229
98f44804 230 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
231 the type of a decl.
232
2cd7caae 233 * c-typeck.c (c_build_va_arg): Clarify the error message.
234
95cfd391 2352015-04-29 Thomas Schwinge <thomas@codesourcery.com>
236
237 * c-parser.c (c_parser_oacc_enter_exit_data): Use
238 OMP_STANDALONE_CLAUSES.
239
e65e39f8 2402015-04-28 Marek Polacek <polacek@redhat.com>
241
242 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
243
5580bf42 2442015-04-28 Marek Polacek <polacek@redhat.com>
245
246 PR c/65901
247 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
248
c3468fc2 2492015-04-25 Marek Polacek <polacek@redhat.com>
250
251 PR c/52085
252 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
253 attribute.
254
0cd6b1b4 2552015-04-23 Marek Polacek <polacek@redhat.com>
256
257 PR c/65345
258 * c-decl.c (set_labels_context_r): New function.
259 (store_parm_decls): Call it via walk_tree_without_duplicates.
260 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
261 instead of create_tmp_var. Build TARGET_EXPR instead of
262 COMPOUND_EXPR.
263 (build_atomic_assign): Use create_tmp_var_raw instead of
264 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
265
05a827ce 2662015-04-20 Ilya Verbin <ilya.verbin@intel.com>
267
268 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
269 (c_parser_omp_target_update): Add missed %> to error_at ().
270
de801c28 2712015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
272
273 PR target/55143
274 * c-decl.c (c_default_pointer_mode): Remove definition.
275 * c-tree.h (c_default_pointer_mode): Remove declaration.
276
c3b1dca4 2772015-03-27 Tobias Burnus <burnus@net-b.de>
278
279 PR c/65586
280 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
281 error out.
282 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
283 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
284 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
285
1443772f 2862015-03-19 Jakub Jelinek <jakub@redhat.com>
287
288 * c-decl.c (c_decl_attributes): Also add "omp declare target"
289 attribute for DECL_EXTERNAL VAR_DECLs.
290
76738f56 2912015-03-11 Jakub Jelinek <jakub@redhat.com>
292
293 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
294 argument.
295
16f958b3 2962015-03-10 Jakub Jelinek <jakub@redhat.com>
297
298 PR c/65120
299 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
300 before preparing arguments to warn_logical_not_parentheses.
301
6054103a 3022015-03-09 Jakub Jelinek <jakub@redhat.com>
303
304 PR c/65120
305 * c-typeck.c (parser_build_binary_op): Don't warn for
306 !!x == y or !b == y where b is _Bool.
307
de3a1e03 3082015-03-09 Marek Polacek <polacek@redhat.com>
309
310 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
311 * c-decl.c (grokdeclarator): Likewise.
312 * c-typeck.c (build_binary_op): Likewise.
313
084e6bf0 3142015-02-27 Marek Polacek <polacek@redhat.com>
315
316 PR c/65228
317 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
318
4d7c4134 3192015-02-14 Marek Polacek <polacek@redhat.com>
320
321 PR c/64768
322 * c-decl.c (grokdeclarator): Set the range of a flexible array member
323 declared through a typedef name.
324
b1380826 3252015-02-13 Marek Polacek <polacek@redhat.com>
326
327 PR c/65050
328 * c-decl.c (grokdeclarator): Print also the type when giving
329 the error message about array's incomplete element type.
330
35ff54b5 3312015-02-11 Jakub Jelinek <jakub@redhat.com>
332
333 PR c/64824
334 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
335 check in the POP macro.
336
46861609 3372015-02-09 Marek Polacek <polacek@redhat.com>
338
339 PR c/64856
340 * c-typeck.c (process_init_element): Don't always wrap
341 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
342 initializing a range of elements.
343
bbf8fbec 3442015-02-04 Jakub Jelinek <jakub@redhat.com>
345
346 PR c/64824
347 PR c/64868
348 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
349
46861609 3502015-02-02 Bruno Loff <bruno.loff@gmail.com>
1f0ce3ac 351
352 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
353 processing enum declaration.
354
70279be9 3552015-01-29 Marek Polacek <polacek@redhat.com>
356
357 PR c/64709
358 * c-typeck.c (pop_init_level): If constructor_elements has
359 exactly one element with integer_zerop value, set constructor_zeroinit
360 to 1. Remove braces around warning_init call.
361
591970b4 3622015-01-27 Jakub Jelinek <jakub@redhat.com>
363
364 PR c/64766
365 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
366 of FUNCTION_DECLs with error_mark_node.
367
87778dc4 3682015-01-26 Jakub Jelinek <jakub@redhat.com>
369
370 PR c/64778
371 * c-typeck.c (convert_arguments): Return -1 if there are
372 error_args, even if we've diagnosed too many arguments.
373
cffdfb3d 3742015-01-21 Richard Biener <rguenther@suse.de>
375
376 PR middle-end/64313
377 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
378 for builtins the user declared correctly.
379
ca4c3545 3802015-01-15 Thomas Schwinge <thomas@codesourcery.com>
381 Bernd Schmidt <bernds@codesourcery.com>
382 Cesar Philippidis <cesar@codesourcery.com>
383 James Norris <jnorris@codesourcery.com>
384 Jakub Jelinek <jakub@redhat.com>
385 Ilmir Usmanov <i.usmanov@samsung.com>
386
387 * c-parser.c: Include "gomp-constants.h".
388 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
389 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
390 Use OMP_CLAUSE_SET_MAP_KIND.
391 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
392 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
393 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
394 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
395 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
396 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
397 "copyout", "create", "delete", "deviceptr", "gang", "host",
398 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
399 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
400 "present_or_create", "pcreate", "seq", "self", "vector",
401 "vector_length", "wait", "worker".
402 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
403 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
404 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
405 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
406 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
407 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
408 (c_parser_oacc_data_clause_deviceptr)
409 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
410 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
411 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
412 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
413 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
414 (c_parser_oacc_parallel, c_parser_oacc_update)
415 (c_parser_oacc_wait): New functions.
416 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
417 (c_finish_oacc_data): New prototypes.
418 * c-typeck.c: Include "gomp-constants.h".
419 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
420 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
421 OMP_CLAUSE_SET_MAP_KIND.
422 (c_finish_oacc_parallel, c_finish_oacc_kernels)
423 (c_finish_oacc_data): New functions.
424 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
425 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
426 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
427 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
428 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
429 GOMP_MAP_FORCE_DEVICEPTR.
430
1f78217c 4312015-01-09 Michael Collison <michael.collison@linaro.org>
432
433 * c-array-notation.c: Include hash-set.h, machmode.h,
434 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
435 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
436 * c-aux-info.c: Ditto.
437 * c-convert.c: Ditto.
438 * c-decl.c: Ditto.
439 * c-errors.c: Ditto.
440 * c-lang.c: Dittoxs.
441 * c-objc-common.c: Ditto.
442 * c-parser.c: Ditto.
443 * c-typeck.c: Include hash-set.h, machmode.h,
444 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
445 fold-const.h, wide-int.h, inchash.h, real.h and
446 fixed-value.h due to flattening of tree.h.
447
15e18a8c 4482015-01-07 Marek Polacek <polacek@redhat.com>
449
450 PR c/64417
451 * c-typeck.c (process_init_element): Disallow initialization of
452 a flexible array member with a string constant if the structure
453 is in an array.
454
d353bf18 4552015-01-05 Jakub Jelinek <jakub@redhat.com>
456
823a9dd4 457 PR sanitizer/64344
458 * c-typeck.c (convert_for_assignment, c_finish_return): For
459 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
460 types also set in_late_binary_op around convert call.
461 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
462 to integral type casts, if not in_late_binary_op, pass c_fully_fold
463 result on expr as last argument to ubsan_instrument_float_cast,
464 if in_late_binary_op, don't use c_save_expr but save_expr.
465
d353bf18 466 Update copyright years.
467
92b63884 4682015-01-05 Marek Polacek <polacek@redhat.com>
469
470 PR c/64423
471 * c-typeck.c (build_array_ref): Pass loc down to
472 warn_array_subscript_with_type_char.
473
8a8211df 4742014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
475
476 * c-typeck.c: New behavious for pointers to arrays with qualifiers
477 (common-pointer-type): For pointers to arrays take qualifiers from
478 element type.
479 (build_conditional_expr): Add warnings for lost qualifiers.
480 (comp-target-types): Allow pointers to arrays with different qualifiers.
481 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
482 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
483 to PEDWARN_FOR_QUALIFIERS.
484
35ea0139 4852014-12-17 Jakub Jelinek <jakub@redhat.com>
486
487 PR sanitizer/64289
488 * c-convert.c: Include ubsan.h.
489 (convert): For real -> integral casts and
490 -fsanitize=float-cast-overflow don't call convert_to_integer, but
491 instead instrument the float cast directly.
492
f9e245b2 4932014-11-29 Jakub Jelinek <jakub@redhat.com>
494
495 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
496 c_finish_stmt_expr): Remove NULL last argument from
497 create_tmp_var_raw and create_tmp_var calls.
498 * c-array-notation.c (fix_builtin_array_notation_fn,
499 build_array_notation_expr, fix_conditional_array_notations_1,
500 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
501
fce2dbd1 5022014-11-28 Marek Polacek <polacek@redhat.com>
503
504 PR c/63862
505 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
506 convert the right operand to integer type.
507
396c36b7 5082014-11-25 Marek Polacek <polacek@redhat.com>
509
510 PR c/63877
511 * c-decl.c (start_function): Disable -Wmissing-declarations warning
512 for inline functions.
513
c61ef207 5142014-11-21 Jakub Jelinek <jakub@redhat.com>
515
516 PR target/63764
517 * c-typeck.c (build_array_ref): Adjust
518 convert_vector_to_pointer_for_subscript caller. If it returns true,
519 call non_lvalue_loc on the result.
520
565353e8 5212014-11-11 Richard Biener <rguenther@suse.de>
522
523 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
524 to true.
525
fdd735a7 5262014-11-10 Andi Kleen <ak@linux.intel.com>
527
528 PR c/60804
529 * c-parser.c (c_parser_statement_after_labels): Call
530 check_no_cilk.
531 (c_parser_if_statement): Dito.
532 (c_parser_switch_statement): Dito.
533 (c_parser_while_statement): Dito.
534 (c_parser_do_statement): Dito.
535 (c_parser_for_statement): Dito.
536 * c-typeck.c (c_finish_loop): Dito.
537
0feb4de1 5382014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
539
540 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
541 OPT_Wshift_count_overflow in the warnings.
542
a3fec48a 5432014-10-30 Marek Polacek <polacek@redhat.com>
544
545 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
546 print the stripped version as well, if they're not the same.
547
3754d046 5482014-10-29 Richard Sandiford <richard.sandiford@arm.com>
549
550 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
551 machine_mode.
552
1140c305 5532014-10-28 Andrew MacLeod <amacleod@redhat.com>
554
555 * c-decl.c: Adjust include files.
556 * c-parser.c: Ditto.
557
ab103e33 5582014-10-27 Phil Muldoon <pmuldoon@redhat.com>
559 Tom Tromey <tromey@redhat.com>
560
561 * c-tree.h (enum c_oracle_request): New.
562 (c_binding_oracle_function): New typedef.
563 (c_binding_oracle, c_pushtag, c_bind): Declare.
564 * c-decl.c (c_binding_oracle): New global.
565 (I_SYMBOL_CHECKED): New macro.
566 (i_symbol_binding): New function.
567 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
568 (I_TAG_CHECKED): New macro.
569 (i_tag_binding): New function.
570 (I_TAG_BINDING, I_TAG_DECL): Redefine.
571 (I_LABEL_CHECKED): New macro.
572 (i_label_binding): New function.
573 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
574 (c_print_identifier): Save and restore c_binding_oracle.
575 (c_pushtag, c_bind): New functions.
576
94ea8568 5772014-10-27 Andrew MacLeod <amacleod@redhat.com>
578
579 * c-typeck.c: Adjust include files.
580
32ecf960 5812014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
582
583 PR c++/53061
584 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
585 initialization here...
586 (c_initialize_diagnostics): ... but here. Set defaults after
587 building pretty-printer.
588
2981340f 5892014-10-23 Marek Polacek <polacek@redhat.com>
590
591 PR c/63626
592 * c-decl.c (pop_scope): Don't print warning in external_scope.
593
d303aeaf 5942014-10-19 Marek Polacek <polacek@redhat.com>
595
596 PR c/63567
597 * c-typeck.c (output_init_element): Allow initializing objects with
598 static storage duration with compound literals even in C99 and add
599 pedwarn for it.
600
bccf97da 6012014-10-17 Marek Polacek <polacek@redhat.com>
602
603 PR c/63567
604 * c-typeck.c (digest_init): Allow initializing objects with static
605 storage duration with compound literals even in C99 and add pedwarn
606 for it.
607
d9c77450 6082014-10-17 Marek Polacek <polacek@redhat.com>
609
610 PR c/63543
611 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
612 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
613 error multiple times. Print the type.
614
a2bbd0a7 6152014-10-17 Marek Polacek <polacek@redhat.com>
616
617 PR c/63549
618 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
619 type.
620
e610d2b2 6212014-10-17 Marek Polacek <polacek@redhat.com>
622
623 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
624 (start_function): Use OPT_Wimplicit_int instead of 0.
625 (store_parm_decls_oldstyle): Likewise.
626
6b6e56b6 6272014-10-17 Alan Modra <amodra@gmail.com>
628
629 PR middle-end/61848
630 * c-decl.c (merge_decls): Don't merge section name or tls model
631 to newdecl symtab node, instead merge to olddecl. Override
632 existing olddecl section name. Set tls_model for all thread-local
633 vars, not just OMP thread-private ones. Remove incorrect comment.
634
a3020f2f 6352014-10-16 Andrew MacLeod <amacleod@redhat.com>
636
637 * c-decl.c: Adjust include files.
638
9f75f026 6392014-10-14 DJ Delorie <dj@redhat.com>
640
641 * c-parser.c (c_parse_init): Add RID entries for each __intN.
642 (c_token_starts_typename): Check all __intN, not just __int128.
643 (c_token_starts_declspecs): Likewise.
644 (c_parser_declspecs): Likewise.
645 (c_parser_attribute_any_word): Likewise.
646 (c_parser_objc_selector): Likewise.
647 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
648 (struct c_declspecs): Add int_n_idx field to record *which* __intN
649 is specified.
650 * c-decl.c (declspecs_add_type): Check for all __intN, not just
651 __int128.
652 (finish_declspecs): Likewise.
653
4f284d4a 6542014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
655
656 * c-parser.c (c_parser_all_labels): New function to replace
657 the duplicate code.
658 (c_parser_statement): Call the new function.
659
61a892dc 6602014-10-09 Marek Polacek <polacek@redhat.com>
661
662 PR c/63480
663 * c-typeck.c (pop_init_level): Don't warn about initializing
664 with { }.
665
4e888fd9 6662014-10-07 Marek Polacek <polacek@redhat.com>
667
668 PR c/59717
669 * c-decl.c (header_for_builtin_fn): New function.
670 (implicitly_declare): Suggest which header to include.
671
224bdd51 6722014-10-07 Marek Polacek <polacek@redhat.com>
673
674 * c-convert.c (convert): Use error_operand_p.
675 * c-typeck.c (require_complete_type): Likewise.
676 (really_atomic_lvalue): Likewise.
677 (digest_init): Likewise.
678 (handle_omp_array_sections_1): Likewise.
679
a2bc79db 6802014-10-03 Marek Polacek <polacek@redhat.com>
681
682 PR c/63453
683 * c-decl.c (pop_scope): Don't warn about "inline function declared
684 but never defined" for functions marked with gnu_inline attribute.
685
4fc4088b 6862014-09-25 Jakub Jelinek <jakub@redhat.com>
687
688 PR c++/63249
689 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
690 on low_bound and length.
691
5213d6c9 6922014-09-24 Marek Polacek <polacek@redhat.com>
693
694 PR c/61405
695 PR c/53874
696 * c-parser.c: Don't define CPP_KEYWORD.
697 (c_parser_switch_statement): Pass original type to c_finish_case.
698 * c-tree.h (c_finish_case): Update declaration.
699 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
700 conditionally to c_do_switch_warnings.
701
6ea2b1bc 7022014-09-03 Marek Polacek <polacek@redhat.com>
703
704 PR c/62024
705 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
706 conversions.
707
40750995 7082014-09-02 Jakub Jelinek <jakub@redhat.com>
709 Balaji V. Iyer <balaji.v.iyer@intel.com>
710 Igor Zamyatin <igor.zamyatin@intel.com>
711
712 * c-parser.c (c_parser_cilk_for): New function.
713 (c_parser_cilk_grainsize): Likewise.
714 (c_get_temp_regvar): Likewise.
715 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
716 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
717 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
718 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
719 case.
720
8c583613 7212014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
722
723 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
724 with using HOST_WIDE_INT without truncation to 'int'
725
dc6229e8 7262014-08-22 Marek Polacek <polacek@redhat.com>
727
728 PR c++/62199
729 * c-typeck.c (parser_build_binary_op): Adjust call to
730 warn_logical_not_parentheses.
731
5fdda74b 7322014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
733
734 PR other/62008
735 * c-parser.c (c_parser_array_notation): Check for correct
736 type of an array added.
737
78bf4156 7382014-08-19 Marek Polacek <polacek@redhat.com>
739
740 PR c++/62153
741 * c-typeck.c (build_binary_op): If either operand of a comparison
742 is a boolean expression, call maybe_warn_bool_compare.
743
005b8fe7 7442014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
745
746 PR c/45584
747 * c-typeck.c (build_c_cast): Do a conversion even when the
748 TYPE_MAIN_VARIANTs are the same.
749
508ea33a 7502014-08-19 Marek Polacek <polacek@redhat.com>
751
752 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
753 pedwarn_c99 instead of pedwarn.
754 (grokfield): Likewise.
755 (warn_defaults_to): New function.
756 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
757 Unconditionally call pedwarn_c99 instead of pedwarn.
758 (start_function): Call warn_defaults_to instead of pedwarn_c99.
759 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
760 check flag_isoc11 before.
761 * c-errors.c (pedwarn_c99): Change the return type to bool.
762 Handle -Wc99-c11-compat.
763 * c-parser.c (disable_extension_diagnostics): Handle
764 warn_c99_c11_compat.
765 (restore_extension_diagnostics): Likewise.
766 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
767 instead of pedwarn, don't check flag_isoc11 before.
768 (c_parser_declspecs): Likewise.
769 (c_parser_alignas_specifier): Likewise.
770 (c_parser_alignof_expression): Likewise.
771 (c_parser_generic_selection): Likewise.
772 * c-tree.h (pedwarn_c99): Update declaration.
773 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
774 of pedwarn_c99.
775
806fe15e 7762014-08-19 Marek Polacek <polacek@redhat.com>
777
778 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
779 to pedwarn_c90.
780 * c-errors.c: Include "opts.h".
781 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
782 * c-parser.c (disable_extension_diagnostics): Handle negative value
783 of warn_c90_c99_compat, too.
784 (restore_extension_diagnostics): Likewise.
785 (c_parser_compound_statement_nostart): Pass
786 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
787
89868e45 7882014-08-12 Marek Polacek <polacek@redhat.com>
789
790 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
791 Add pedwarn.
792 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
793 Likewise.
794 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
795
890c2e2f 7962014-08-10 Marek Polacek <polacek@redhat.com>
797
798 PR c/51849
799 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
800 Call pedwarn_c90 instead of pedwarn.
801 (check_bitfield_type_and_width): Likewise.
802 (declspecs_add_qual): Likewise.
803 (declspecs_add_type): Likewise.
804 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
805 Adjust to only call pedwarn_c90.
806 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
807 pedwarn_c90 instead of pedwarn.
808 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
809 * c-parser.c (disable_extension_diagnostics): Handle
810 warn_c90_c99_compat.
811 (restore_extension_diagnostics): Likewise.
812 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
813 pedwarn_c90 instead of pedwarn.
814 (c_parser_initelt): Likewise.
815 (c_parser_postfix_expression): Likewise.
816 (c_parser_postfix_expression_after_paren_type): Likewise.
817 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
818 * c-tree.h: Fix formatting.
819 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
820 pedwarn_c90 instead of pedwarn.
821
7149db5f 8222014-08-07 Trevor Saunders <tsaunders@mozilla.com>
823
824 * c-typeck.c: Remove include of pointer-set.h.
825
1c75251e 8262014-08-07 Marek Polacek <polacek@redhat.com>
827
828 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
829
06ecf488 8302014-08-02 Trevor Saunders <tsaunders@mozilla.com>
831
832 * c-typeck.c: Use hash_map instead of pointer_map.
833
431205b7 8342014-08-02 Trevor Saunders <tsaunders@mozilla.com>
835
836 * c-decl.c: Use hash_set instead of pointer_set.
837
3394c80c 8382014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
839
840 PR middle-end/61455
841 * c-array-notation.c (expand_array_notations): Handling
842 of DECL_EXPR added.
843
f22a2cb7 8442014-07-31 Marc Glisse <marc.glisse@inria.fr>
845
846 PR c++/60517
847 * c-typeck.c (c_finish_return): Return 0 instead of the address of
848 a local variable.
849
74691f46 8502014-07-30 Tom Tromey <tromey@redhat.com>
851
852 * c-typeck.c (struct constructor_stack) <designator_depth>: New
853 field.
854 (really_start_incremental_init, push_init_level): Initialize
855 designator_depth.
856 (pop_init_level): Set global designator_depth.
857 (process_init_element): Check for designated_init attribute.
858
f9767fb6 8592014-07-20 Marek Polacek <polacek@redhat.com>
860
861 PR c/61852
862 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
863 (implicitly_declare): Pass location to implicit_decl_warning.
864
305d96bc 8652014-07-14 Jakub Jelinek <jakub@redhat.com>
866
867 PR middle-end/61294
868 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
869 If non-NULL, call c_parser_check_literal_zero.
870 (c_parser_check_literal_zero): New function.
871 (c_parser_postfix_expression_after_primary): Adjust
872 c_parser_expr_list caller, handle -Wmemset-transposed-args.
873
87d59e72 8742014-07-06 Marek Polacek <polacek@redhat.com>
875
876 PR c/6940
877 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
878 * c-tree.h (C_ARRAY_PARAMETER): Define.
879 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
880 function parameter.
881
752098c8 8822014-07-02 Jan Hubicka <hubicka@ucw.cz>
883 Chen Gang <gang.chen.5i5j@gmail.com>
884
885 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
886 releasing symbol.
887
1207866e 8882014-07-01 Marek Polacek <polacek@redhat.com>
889
890 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
891 instead of 0 to WARN_FOR_ASSIGNMENT.
892
7a6bbb76 8932014-07-01 Marek Polacek <polacek@redhat.com>
894
895 PR c/58286
896 * c-typeck.c (convert_for_assignment): Pass
897 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
898
70575064 8992014-06-30 Marek Polacek <polacek@redhat.com>
900
901 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
902 has no_sanitize_undefined attribute.
903
4879e4cf 9042014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
905
906 PR middle-end/57541
907 * c-array-notation.c (fix_builtin_array_notation_fn):
908 Check for 0 arguments in builtin call. Check that bultin argument is
909 correct.
910 * c-parser.c (c_parser_array_notation): Check for incorrect initial
911 index.
912
45c5b823 9132014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
914
915 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
916 qualifiers in __auto_type for atomic types.
917 (c_parser_typeof_specifier): Discard all type qualifiers in
918 __typeof__ for atomic types.
919
430b73ee 9202014-06-25 Marek Polacek <polacek@redhat.com>
921
922 PR c/61162
923 * c-parser.c (c_parser_statement_after_labels): Pass the location of
924 the return expression to c_finish_return.
925
9580cb79 9262014-06-25 Jakub Jelinek <jakub@redhat.com>
927
928 * c-typeck.c (c_finish_omp_clauses): Make sure
929 OMP_CLAUSE_LINEAR_STEP has correct type.
930
c1f445d2 9312014-06-24 Trevor Saunders <tsaunders@mozilla.com>
932
933 * c-decl.c: Adjust.
934
e471cc6f 9352014-06-24 Jakub Jelinek <jakub@redhat.com>
936
937 * c-parser.c (c_parser_omp_for_loop): For
938 #pragma omp parallel for simd move lastprivate clause from parallel
939 to for rather than simd.
940
499b7390 9412014-06-23 Marek Polacek <polacek@redhat.com>
942
943 * c-typeck.c (parser_build_binary_op): Don't call
944 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
945
5e68df57 9462014-06-15 Jan Hubicka <hubicka@ucw.cz>
947
948 * c-parser.c (c_parser_omp_threadprivate): Likewise.
949 * c-decl.c (merge_decls): Likewise.
950
064b0d02 9512014-06-09 Marek Polacek <polacek@redhat.com>
952
953 PR c/36446
954 * c-typeck.c (error_init): Call inform instead of error_at.
955 (pedwarn_init): Call inform instead of pedwarn.
956 (warning_init): Call inform instead of warning_at.
957
71e19e54 9582014-06-07 Jan Hubicka <hubicka@ucw.cz>
959
960 * c-decl.c (merge_decls): Use set_decl_section_name.
961 (duplicate_decls): Remove node if it exists.
962
95cdf3fd 9632014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
964
965 PR c/53119
966 * c-typeck.c (push_init_level, process_init_element,
967 pop_init_level): Correct check for zero initialization, move
968 missing brace warning to respect zero initialization.
969
a07f86a6 9702014-06-05 Marek Polacek <polacek@redhat.com>
971
972 PR c/56724
973 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
974
32dc1512 9752014-06-05 Marek Polacek <polacek@redhat.com>
976
977 PR c/49706
978 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
979 on the left hand side operand of a comparison.
980
64cf1262 9812014-06-05 Marek Polacek <polacek@redhat.com>
982
983 PR c/48062
984 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
985 Print note only if the warning was printed.
986
071f6d39 9872014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
988
989 PR c/58942
990 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
991 with a pointer.
992
c69ec07d 9932014-06-03 Marek Polacek <polacek@redhat.com>
994
995 PR c/60439
996 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
997 c_start_case.
998 * c-tree.h (c_start_case): Update.
999 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1000 switch condition has boolean value.
1001
f7715905 10022014-06-02 Andrew MacLeod <amacleod@redhat.com>
1003
1004 * c-decl.c: Include builtins.h.
1005 * c-parser.c: Likewise.
1006
dcfff6f9 10072014-05-27 Marek Polacek <polacek@redhat.com>
1008
1009 PR c/56724
1010 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1011 error and warning calls to error_at and warning_at. Pass location of
1012 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1013 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1014 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1015
c048c42c 10162014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1017
1018 PR c/61191
1019 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1020 function parameters.
1021
8c016392 10222014-05-23 Jan Hubicka <hubicka@ucw.cz>
1023
1024 * c-decl.c (merge_decls): Preserve symtab node pointers.
1025 (duplicate_decls): Free new decl.
1026
184a718f 10272014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1028
6ce915ef 1029 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1030 initialization.
1031
184a718f 1032 * c-parser.c (c_parser_omp_target): Return bool values.
1033
22ac3f78 10342014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1035
1036 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1037 num_teams_loc variable to num_thread_limit_loc.
1038
3ab4693e 10392014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1040
1041 * c-array-notation.c (expand_array_notations): Use void_node
1042 instead of void_zero_node.
1043
25a27413 10442014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1045
1046 * c-decl.c (finish_struct): Adjust.
1047 (finish_enum): Likewise.
1048 (bind): Adjust.
1049 (record_inline_static): Likewise.
1050 (push_scope): Likewise.
1051 (make_label): Likewise.
1052 (lookup_label_for_goto): Likewise.
1053 (finish_struct): Likewise.
1054 (finish_enum): Likewise.
1055 (store_parm_decls): Likewise.
1056 (c_push_function_context): Likewise.
1057 * c-lang.h: Remove usage of variable_size gty attribute.
1058 * c-parser.c (c_parse_init): Adjust.
1059 (c_parse_file): Likewise.
1060
172b8440 10612014-05-13 Marek Polacek <polacek@redhat.com>
1062
1063 PR c/61162
1064 * c-typeck.c (convert_for_assignment): Pass location to
1065 WARN_FOR_ASSIGNMENT instead of input_location.
1066
c9e51d25 10672014-05-10 Marek Polacek <polacek@redhat.com>
1068
1069 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1070 maybe_warn_string_init.
1071 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1072 maybe_warn_string_init.
1073 * c-tree.h (maybe_warn_string_init): Update declaration.
1074 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1075 Call pedwarn_init with loc instead of with input_location.
1076 (digest_init): Pass init_loc to maybe_warn_string_init.
1077 (pop_init_level): Call pedwarn_init with loc instead of with
1078 input_location.
1079 (set_init_index): Likewise.
1080 (process_init_element): Likewise.
1081
53de1631 10822014-05-09 Marek Polacek <polacek@redhat.com>
1083
1084 PR c/61096
1085 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1086 (c_parser_initelt): Pass location to set_init_label. Pass array index
1087 location to set_init_index.
1088 * c-tree.h (push_init_level): Update declaration.
1089 (pop_init_level): Likewise.
1090 (set_init_index): Likewise.
1091 (set_init_label): Likewise.
1092 * c-typeck.c (error_init): Add location parameter. Call error_at
1093 instead of error.
1094 (digest_init): Pass init_loc to error_init.
1095 (really_start_incremental_init):
1096 (push_init_level): Add location parameter. Pass loc to pop_init_level
1097 and error_init.
1098 (pop_init_level): Likewise.
1099 (set_designator): Add location parameter. Pass loc to pop_init_level,
1100 push_init_level, and error_init.
1101 (set_init_index): Add location parameter. Pass loc to error_init and
1102 set_designator.
1103 (set_init_label): Likewise.
1104 (output_init_element): Pass loc to error_init.
1105 (process_init_element): Pass loc to error_init, pop_init_level,
1106 pedwarn_init, and push_init_level.
1107
3e5a8b00 11082014-05-09 Marek Polacek <polacek@redhat.com>
1109
1110 PR c/50459
1111 * c-parser.c (c_parser_attributes): Parse the arguments as an
1112 expression-list if the attribute takes identifier.
1113
c2c4ae8d 11142014-05-08 Marek Polacek <polacek@redhat.com>
1115
1116 PR c/61053
1117 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1118 TYPE_ALIGN_UNIT.
1119
2026249a 11202014-05-08 Marek Polacek <polacek@redhat.com>
1121
1122 PR c/61077
1123 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1124 of main.
1125
960d5a55 11262014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1127 Mike Stump <mikestump@comcast.net>
1128 Richard Sandiford <rdsandiford@googlemail.com>
1129
1130 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1131 (finish_enum): Use wide-int interfaces.
1132 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1133 * c-typeck.c (build_c_cast): Likewise.
1134 (set_nonincremental_init_from_string): Likewise.
1135 (c_tree_equal): Likewise.
1136
e0e14cbd 11372014-05-02 Marek Polacek <polacek@redhat.com>
1138
1139 PR c/25801
1140 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1141 Return size_one_node when the type is not complete.
1142 (pointer_diff): Remove comment.
1143 (build_unary_op): Improve error messages.
1144
27ff10cb 11452014-05-02 Marek Polacek <polacek@redhat.com>
1146
1147 * c-typeck.c (c_finish_return): Separate warning_at calls.
1148
68410ce9 11492014-05-02 Marek Polacek <polacek@redhat.com>
1150
1151 * c-tree.h (error_init): Remove declaration.
1152 (pedwarn_init): Likewise.
1153 * c-typeck.c (error_init): Make static and move above.
1154 (pedwarn_init): Likewise.
1155 (warning_init): Move above.
1156 (maybe_warn_string_init): Likewise.
1157
e8e27117 11582014-05-01 Jeff Law <law@redhat.com>
1159
1160 Revert:
1161
1162 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1163 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1164 avoid goto.
1165
971df357 11662014-05-02 Marek Polacek <polacek@redhat.com>
1167
1168 PR c/60784
1169 * c-typeck.c (push_init_level): Set constructor_designated to
1170 p->designated for structures.
1171
de548fe5 11722014-05-01 Marek Polacek <polacek@redhat.com>
1173
1174 PR c/60915
1175 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1176 function-definition has an attribute after the declarator.
1177
053a0ded 11782014-05-01 Marek Polacek <polacek@redhat.com>
1179
1180 PR c/60257
1181 * c-typeck.c (warning_init): Add location_t parameter. Call
1182 warning_at instead of warning.
1183 (push_init_level): Pass input_location to warning_init.
1184 (add_pending_init): Add location_t parameter. Pass loc to
1185 warning_init.
1186 (set_nonincremental_init): Pass input_location to add_pending_init.
1187 (set_nonincremental_init_from_string): Likewise.
1188 (output_init_element): Pass loc to warning_init and to
1189 add_pending_init.
1190
694296f2 11912014-05-01 Marek Polacek <polacek@redhat.com>
1192
1193 PR c/43395
1194 * c-typeck.c (c_finish_return): Distinguish between label and variable
1195 when warning about returning local address.
1196
86bbd7f9 11972014-05-01 Marek Polacek <polacek@redhat.com>
1198
1199 PR c/29467
1200 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1201 in C89 mode.
1202
e4ab2ef3 12032014-05-01 Marek Polacek <polacek@redhat.com>
1204
1205 PR c/43245
1206 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1207 instead of 0 to WARN_FOR_QUALIFIERS.
1208
ca3999cb 12092014-05-01 Marek Polacek <polacek@redhat.com>
1210
1211 PR c/56989
1212 * c-typeck.c (default_conversion): Use better location for
1213 error call.
1214
52cc0072 12152014-04-30 Marek Polacek <polacek@redhat.com>
1216
1217 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1218 also when SANITIZE_FLOAT_DIVIDE is on.
1219
af379dd3 12202014-04-30 Marek Polacek <polacek@redhat.com>
1221
1222 PR c/60139
1223 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1224 and pedwarn_init. Use loc insted of input_location.
1225
b069c2a0 12262014-04-30 Marek Polacek <polacek@redhat.com>
1227
1228 PR c/60351
1229 * c-typeck.c (build_binary_op): Use location when warning about
1230 shift count.
1231
4a026b48 12322014-04-25 Marek Polacek <polacek@redhat.com>
1233
1234 PR c/18079
1235 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1236 always_inline/noinline and hot/cold attributes.
1237
adc93f31 12382014-04-25 Marek Polacek <polacek@redhat.com>
1239
1240 PR c/60114
1241 * c-parser.c (c_parser_initelt): Pass input_location to
1242 process_init_element.
1243 (c_parser_initval): Pass loc to process_init_element.
1244 * c-tree.h (process_init_element): Adjust declaration.
1245 * c-typeck.c (push_init_level): Pass input_location to
1246 process_init_element.
1247 (pop_init_level): Likewise.
1248 (set_designator): Likewise.
1249 (output_init_element): Add location_t parameter. Pass loc to
1250 digest_init.
1251 (output_pending_init_elements): Pass input_location to
1252 output_init_element.
1253 (process_init_element): Add location_t parameter. Pass loc to
1254 output_init_element.
1255
e1029911 12562014-04-24 Jakub Jelinek <jakub@redhat.com>
1257
1258 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1259 atomic-clause, allow comma in between atomic-clause and
1260 seq_cst.
1261
9f0a7bc6 12622014-04-22 Jakub Jelinek <jakub@redhat.com>
1263
1264 PR c/59073
1265 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1266 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1267
094da06d 12682014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1269
1270 PR middle-end/60469
1271 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1272 create_tmp_var instead build_decl for creating temps.
1273 (build_array_notation_expr): Likewise.
1274 (fix_conditional_array_notations_1): Likewise.
1275 (fix_array_notation_expr): Likewise.
1276 (fix_array_notation_call_expr): Likewise.
1277
5a672e62 12782014-03-28 Jakub Jelinek <jakub@redhat.com>
1279
1280 PR c++/60689
1281 * c-tree.h (c_build_function_call_vec): New prototype.
1282 * c-typeck.c (build_function_call_vec): Don't call
1283 resolve_overloaded_builtin here.
1284 (c_build_function_call_vec): New wrapper function around
1285 build_function_call_vec. Call resolve_overloaded_builtin here.
1286 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1287 Call c_build_function_call_vec instead of build_function_call_vec.
1288 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1289 * c-decl.c (finish_decl): Likewise.
1290
f40f5e0e 12912014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1292
1293 PR c/55383
1294 * c-typeck.c: Use correct format string in cast-qual warning
1295
9ec099a3 12962014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1297
1298 * c-decl.c (c_decl_attributes): Use
1299 lang_hooks.types.omp_mappable_type.
1300 * c-typeck.c (c_finish_omp_clauses): Likewise.
1301
3bfdc94f 13022014-03-06 Marek Polacek <polacek@redhat.com>
1303
1304 PR c/60197
1305 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1306 of checking tree code.
1307
8f1128f8 13082014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1309
1310 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1311 (c_parser_parameter_declaration): Likewise.
1312
977b1853 13132014-02-19 Marek Polacek <polacek@redhat.com>
1314
1315 PR c/60195
1316 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1317 Call mark_exp_read on exp.value.
1318 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1319 TREE_ADDRESSABLE on old instead of val.
1320 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1321
825cd6ef 13222014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1323
1324 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1325 C_EXPR_APPEND by vec_safe_push.
1326 * c-tree.h (C_EXPR_APPEND): Remove.
1327
ec761d5a 13282014-01-31 Marek Polacek <polacek@redhat.com>
1329
1330 PR c/59963
1331 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1332 build_function_call_vec.
1333 (build_function_call): Likewise.
1334 (build_atomic_assign): Likewise.
1335 (build_function_call_vec): Add arg_loc parameter. Use it.
1336 (convert_arguments): Likewise.
1337 (convert_for_assignment): Rename rhs_loc to expr_loc.
1338 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1339 (c_parser_objc_keywordexpr): Likewise.
1340 (c_parser_postfix_expression_after_primary): Call
1341 build_function_call_vec with expr_loc rather than op_loc.
1342 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1343 build_function_call_vec.
1344 (c_parser_expr_list): Add locations parameter. Fill it with locations
1345 of function arguments.
1346 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1347
22a75734 13482014-01-30 Marek Polacek <polacek@redhat.com>
1349
1350 PR c/59940
1351 * c-typeck.c (build_function_call_vec): Use loc parameter.
1352 (convert_arguments): Add location parameter. Use it.
1353 (ep_convert_and_check): Likewise.
1354 (build_atomic_assign): Adjust convert_for_assignment call.
1355 (build_modify_expr): Likewise.
1356 (digest_init): Likewise.
1357 (c_finish_return): Likewise.
1358 (build_conditional_expr): Adjust ep_convert_and_check calls.
1359 (convert_for_assignment): Add rhs_loc parameter. Use it.
1360 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1361 calls.
1362
29f580ac 13632014-01-30 Richard Biener <rguenther@suse.de>
1364
1365 PR c/59905
1366 * c-typeck.c (build_function_call_vec): Do not replace calls
1367 to a function via an incompatible type with a runtime abort.
1368
a89e6c15 13692014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1370
1371 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1372 flag_enable_cilkplus with flag_cilkplus.
1373 (c_parser_direct_declarator_inner): Likewise.
1374 (c_parser_attribute_any_word): Likewise.
1375 (c_parser_attributes): Likewise.
1376 (c_parser_compound_statement): Likewise.
1377 (c_parser_statement_after_labels): Likewise.
1378 (c_parser_if_statement): Likewise.
1379 (c_parser_switch_statement): Likewise.
1380 (c_parser_do_statement): Likewise.
1381 (c_parser_for_statement): Likewise.
1382 (c_parser_unary_expression): Likewise.
1383 (c_parser_postfix_expression): Likewise.
1384 (c_parser_postfix_expression_after_primary): Likewise.
1385 (c_parser_postfix_expression_after_primary): Likewise.
1386 (c_parser_omp_clause_name): Likewise.
1387 (c_finish_omp_declare_simd): Likewise.
1388 (c_parser_cilk_verify_simd): Likewise.
1389 * c-typeck.c (build_array_ref): Likewise.
1390 (build_function_call_vec): Likewise.
1391 (convert_arguments): Likewise.
1392 (build_compound_expr): Likewise.
1393 (c_finish_return): Likewise.
1394 (c_finish_if_stmt): Likewise.
1395 (c_finish_loop): Likewise.
1396 (build_binary_op): Likewise.
1397
2623625f 13982014-01-23 Marek Polacek <polacek@redhat.com>
1399
1400 PR c/59846
1401 * c-typeck.c (parser_build_binary_op): Use location instead of
1402 input_location.
1403 (build_binary_op): Pass location to shorten_compare.
1404
46da3601 14052014-01-23 Marek Polacek <polacek@redhat.com>
1406
1407 PR c/58346
1408 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1409 an empty aggregate.
1410
9a9db3c1 14112014-01-23 Marek Polacek <polacek@redhat.com>
1412
1413 PR c/59871
1414 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1415 of a comma expression.
1416 (emit_side_effect_warnings): Likewise.
1417
69c9b607 14182014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1419
1420 PR c/59825
1421 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1422 function to use walk_tree and moved a lot of its functionality to
1423 expand_array_notations.
1424 (expand_array_notations): New function.
1425
7e005ab5 14262014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1427
1428 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1429 attribute an attribute without value.
1430
d6779b5f 14312014-01-23 Jakub Jelinek <jakub@redhat.com>
1432
1433 PR middle-end/58809
1434 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1435 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1436
ec431042 14372014-01-22 Marek Polacek <polacek@redhat.com>
1438
1439 PR c/59891
1440 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1441 of remove_c_maybe_const_expr on op1 and op2.
1442
1248c663 14432014-01-15 Jakub Jelinek <jakub@redhat.com>
1444
1445 PR c/58943
1446 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1447 effects, preevaluate rhs using SAVE_EXPR first.
1448
0bc789fc 14492014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1450
1451 PR c++/59631
1452 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1453 statements with if-elseif statements.
1454
6685d11c 14552014-01-06 Marek Polacek <polacek@redhat.com>
1456
1457 PR c/57773
1458 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1459 defined bit-field types only in ISO C.
1460
3aea1f79 14612014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1462
1463 Update copyright years
1464
e4f22041 14652014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1466
1467 * c-array-notation.c: Use the standard form for the copyright notice.
1468
74acc703 14692013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1470
1471 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1472 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1473 field in parser is not empty. If not-empty, call the function
1474 c_parser_finish_omp_declare_simd.
1475 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1476 between SIMD-enabled functions and #pragma simd. Added new parameter.
1477 (c_parser_cilk_all_clauses): Modified the usage of the function
1478 c_parser_cilk_clause_vectorlength as mentioned above.
1479 (c_parser_cilk_simd_fn_vector_attrs): New function.
1480 (c_finish_cilk_simd_fn_tokens): Likewise.
1481 (is_cilkplus_vector_p): Likewise.
1482 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1483 "nomask," and "mask" strings in clause name.
1484 (c_parser_omp_all_clauses): Added 3 new case statements:
1485 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1486 PRAGMA_CILK_CLAUSE_NOMASK.
1487 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1488 check for vector attribute and if so call the function
1489 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1490 called the function c_finish_cilk_simd_fn_tokens.
1491 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1492 parser field is non-empty. If so, parse them as you would parse
1493 the omp declare simd pragma.
1494 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1495 Added a check when step is a parameter and flag it as error.
1496 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1497 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1498 pragma_omp_clause.
1499
395dc01c 15002013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1501
1502 * c-parser.c (c_parser_omp_parallel): Fix description.
1503
433e804e 15042013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1505
1506 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1507 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1508 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1509 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1510
a179a7dc 15112013-12-04 Joseph Myers <joseph@codesourcery.com>
1512
1513 PR c/52023
1514 * c-parser.c (c_parser_alignas_specifier): Use
1515 c_sizeof_or_alignof_type instead of c_alignof.
1516 (c_parser_alignof_expression): Likewise, with min_alignof
1517 parameter depending on alignof spelling used.
1518
bdf1e3c7 15192013-12-04 Marek Polacek <polacek@redhat.com>
1520
1521 PR c/54113
1522 * c-decl.c (start_function): Don't warn for missing prototype for
1523 inline functions.
1524
05e8f674 15252013-12-03 Marek Polacek <polacek@redhat.com>
1526
1527 PR c/59351
1528 * c-decl.c (build_compound_literal): Allow compound literals with
1529 empty initial value.
1530
39f74d66 15312013-12-02 Joseph Myers <joseph@codesourcery.com>
1532
1533 PR c/58235
1534 * c-typeck.c (build_modify_expr): Diagnose assignment to
1535 expression with array type.
1536
f221adca 15372013-11-29 Joseph Myers <joseph@codesourcery.com>
1538
1539 PR c/42262
1540 * c-typeck.c (process_init_element): Do not treat a string as
1541 initializing a whole array when used with a designator for an
1542 individual element.
1543
75bce827 15442013-11-29 Joseph Myers <joseph@codesourcery.com>
1545
1546 PR c/57574
1547 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1548 an inline function following a static declaration.
1549
dc133326 15502013-11-28 Jakub Jelinek <jakub@redhat.com>
1551
1552 PR c/59310
1553 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1554 to p_name before calling c_parser_omp_teams instead of after.
1555 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1556 argument. Remove unused p_name variable.
1557
d09768a4 15582013-11-27 Aldy Hernandez <aldyh@redhat.com>
1559 Jakub Jelinek <jakub@redhat.com>
1560
1561 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1562 external_scope is NULL.
1563
73fd9cbe 15642013-11-27 Tom de Vries <tom@codesourcery.com>
1565 Marc Glisse <marc.glisse@inria.fr>
1566
1567 PR c++/59032
1568 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1569
bc61cadb 15702013-11-22 Andrew MacLeod <amacleod@redhat.com>
1571
1572 * c-typeck.c: Add required include files from gimple.h.
1573
3df42822 15742013-11-22 David Malcolm <dmalcolm@redhat.com>
1575
1576 * c-decl.c (define_label, shadow_tag_warned)
1577 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1578 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1579 (declspecs_add_type): Remove use of in_system_header macro.
1580 * c-parser.c (c_parser_unary_expression): Likewise.
1581 * c-typeck.c (store_init_value, process_init_element)
1582 (c_start_case): Likewise.
1583
1584 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1585 macro.
1586
1587 * c-parser.c (c_parser_set_source_position_from_token): Remove
1588 reference to in_system_header from comment.
1589
08f817b3 15902013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1591
1592 * c-decl.c (grokdeclarator): Update comment to refer to
1593 tree_to_[su]hwi rather than tree_low_cst.
1594
6a0712d4 15952013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1596
1597 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1598 tree_to_uhwi throughout.
1599
fcb97e84 16002013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1601
1602 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1603 throughout.
1604
35ec552a 16052013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1606
1607 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1608 throughout.
1609
f2697631 16102013-11-15 Aldy Hernandez <aldyh@redhat.com>
1611
1612 * c-parser.c (c_parser_cilk_simd): New.
1613 (c_parser_cilk_verify_simd): New.
1614 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1615 (c_parser_omp_for_loop): Add case for NE_EXPR.
1616 Set c_break_label for CILK_SIMD.
1617 (c_parser_cilk_clause_vectorlength): New.
1618 (c_parser_cilk_clause_linear): New.
1619 (c_parser_cilk_clause_name): New.
1620 (c_parser_cilk_all_clauses): New.
1621 * c-typeck.c (build_unary_op): Pass location argument to
1622 readonly_error.
1623 (build_modify_expr): Same.
1624 (build_asm_expr): Same.
1625 (c_finish_bc_stmt): Error on break/continue in loops.
1626
e795d6e1 16272013-11-14 Andrew MacLeod <amacleod@redhat.com>
1628
1629 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1630
9ed99284 16312013-11-14 Diego Novillo <dnovillo@google.com>
1632
1633 * c-decl.c: Include print-tree.h.
1634 Include stor-layout.h.
1635 Include varasm.h.
1636 Include attribs.h.
1637 Include stringpool.h.
1638 * c-lang.c: Include fold-const.h.
1639 * c-parser.c: Include stringpool.h.
1640 Include attribs.h.
1641 Include stor-layout.h.
1642 Include varasm.h.
1643 Include trans-mem.h.
1644 * c-typeck.c: Include stor-layout.h.
1645 Include trans-mem.h.
1646 Include varasm.h.
1647 Include stmt.h.
1648
4fba5eb9 16492013-11-13 Joseph Myers <joseph@codesourcery.com>
1650
1651 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1652 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1653 __auto_type.
1654 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1655 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1656 RID_AUTO_TYPE.
1657 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1658 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1659 (c_parser_declarator, c_parser_direct_declarator_inner)
1660 (c_parser_parameter_declaration, c_parser_type_name): All callers
1661 changed.
1662 (c_parser_declaration_or_fndef): Handle declarations with type
1663 determined from the initializer.
1664
a8783bee 16652013-11-12 Andrew MacLeod <amacleod@redhat.com>
1666
e795d6e1 1667 * c-typeck.c: Include gimplify.h.
a8783bee 1668
d184e0c0 16692013-11-12 Joseph Myers <joseph@codesourcery.com>
1670
1671 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1672 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1673 comment.
1674 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1675 or _Thread_local as appropriate in diagnostics.
1676 (build_null_declspecs): Initialize ret->thread_gnu_p.
1677 (declspecs_add_scspec): Handle either __thread or _Thread_local
1678 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1679 pedantic. Do not disallow _Thread_local extern and _Thread_local
1680 static.
1681
b560fabd 16822013-11-07 Joseph Myers <joseph@codesourcery.com>
1683 Andrew MacLeod <amacleod@redhat.com>
1684
1685 * c-aux-info.c (gen_type): Handle atomic qualifier.
1686 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1687 qualifiers when compating types.
1688 (shadow_tag_warned): Handle atomic_p in declspecs.
1689 (quals_from_declspecs): Likewise.
1690 (start_decl): Use c_type_promotes_to when promoting argument
1691 types.
1692 (grokdeclarator): Handle _Atomic.
1693 (get_parm_info): Diagnose any qualifier on "void" as only
1694 parameter.
1695 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1696 comparing types. Use c_type_promotes_to when promoting argument
1697 types.
1698 (finish_function): Use c_type_promotes_to when promoting argument
1699 types.
1700 (build_null_declspecs): Handle atomic_p in declspecs.
1701 (declspecs_add_qual): Handle RID_ATOMIC.
1702 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1703 (c_token_starts_declspecs): Handle RID_ATOMIC.
1704 (c_parser_declspecs): Handle atomic type specifiers and
1705 qualifiers.
1706 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1707 from types of expressions with atomic type.
1708 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1709 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1710 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1711 (c_parser_statement_after_labels, c_parser_switch_statement)
1712 (c_parser_for_statement, c_parser_expr_no_commas)
1713 (c_parser_conditional_expression, c_parser_binary_expression)
1714 (c_parser_cast_expression, c_parser_unary_expression)
1715 (c_parser_postfix_expression)
1716 (c_parser_postfix_expression_after_primary, c_parser_expression):
1717 Use convert_lvalue_to_rvalue.
1718 (c_parser_expression_conv, c_parser_expr_list): Document
1719 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1720 (c_parser_objc_synchronized_statement): Use
1721 convert_lvalue_to_rvalue.
1722 (c_parser_objc_selector): Handle RID_ATOMIC.
1723 (c_parser_objc_receiver, c_parser_array_notation): Use
1724 convert_lvalue_to_rvalue.
1725 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1726 _Atomic (type-name).
1727 (struct c_declspecs): Add atomic_p field.
1728 (convert_lvalue_to_rvalue): Declare.
1729 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1730 corresponding atomic types.
1731 (qualify_type): Don't add _Atomic qualifiers from second argument.
1732 (comp_target_types): Do not allow _Atomic mismatches.
1733 (type_lists_compatible_p): Do not remove atomic qualifiers when
1734 comparing types.
1735 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1736 (build_atomic_assign): New functions.
1737 (build_unary_op): Use build_atomic_assign for atomic increment and
1738 decrement.
1739 (build_conditional_expr): Do not treat _Atomic void as a qualified
1740 version of void.
1741 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1742 (find_anonymous_field_with_type, convert_to_anonymous_field)
1743 (convert_for_assignment): Do not remove atomic qualifiers when
1744 comparing types.
1745 (digest_init): Do not accept initialization of arrays of atomic
1746 elements by string constants.
1747 (build_asm_expr): Use convert_lvalue_to_rvalue.
1748 (build_binary_op): Do not treat _Atomic void as a qualified
1749 version of void.
1750
8b023e7c 17512013-11-06 DJ Delorie <dj@redhat.com>
1752
1753 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1754 both explicit and builtin, print the location of the explicit one.
1755
c630ef93 17562013-11-05 Tobias Burnus <burnus@net-b.de>
1757
1758 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1759 c_parser_omp_distribute, c_parser_omp_teams,
1760 c_parser_omp_target, c_parser_omp_declare): Handle
1761 -fopenmp-simd.
1762
2c4c3477 17632013-11-03 Marek Polacek <polacek@redhat.com>
1764
1765 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1766
df205251 17672013-11-01 Jakub Jelinek <jakub@redhat.com>
1768
1769 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1770 check_dup_generic at the end, unless remove is true.
1771 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1772 remove = true;.
1773 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1774
23871d0c 17752013-10-31 Jakub Jelinek <jakub@redhat.com>
1776
1777 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1778 with decl that is not pointer nor array.
1779
d037099f 17802013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1781
1782 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1783 a spawning function is found.
1784 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1785 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1786 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1787 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1788 case.
1789 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1790 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1791 expr.
1792 (c_finish_return): Added a check to reject _Cilk_spawn in return
1793 expression.
1794 (build_cilk_spawn): New function.
1795 (build_cilk_sync): Likewise.
1796 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1797
4c90c04c 17982013-10-27 Tobias Burnus <burnus@net-b.de>
1799
1800 PR other/33426
1801 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1802 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1803 (c_parser_statement_after_labels): Update calls.
1804
48a972c8 18052013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 1806
1807 PR other/33426
1808 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1809 Handle PRAGMA_IVDEP.
1810 (c_parser_statement_after_labels): Update call.
1811
12f86df0 18122013-10-24 Marek Polacek <polacek@redhat.com>
1813
1814 * c-parser.c (c_parser_struct_declaration): Add a comment.
1815 (c_parser_declarator): Don't allow _Alignas here.
1816
7740abd8 18172013-10-17 Andrew MacLeod <amacleod@redhat.com>
1818
1819 * c-parser.c: Include omp-low.h.
1820 * c-typeck.c: Likewise.
1821
43d03c23 18222013-10-17 Marek Polacek <polacek@redhat.com>
1823
1824 PR c/58267
1825 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1826 Document syntax of the array-declarator.
1827 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1828 are not permitted.
1829 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1830 (c_parser_struct_declaration): Likewise.
1831 (c_parser_declarator): Likewise.
1832 (c_parser_direct_declarator_inner): Likewise.
1833 (c_parser_parameter_declaration): Likewise.
1834 (c_parser_type_name): Likewise.
1835
bc7bff74 18362013-10-11 Jakub Jelinek <jakub@redhat.com>
1837
1838 * c-lang.h (current_omp_declare_target_attribute): New extern
1839 decl.
1840 * c-parser.c: Include c-lang.h.
1841 (struct c_parser): Change tokens to c_token *.
1842 Add tokens_buf field. Change tokens_avail type to unsigned int.
1843 (c_parser_consume_token): If parser->tokens isn't
1844 &parser->tokens_buf[0], increment parser->tokens.
1845 (c_parser_consume_pragma): Likewise.
1846 (enum pragma_context): Add pragma_struct and pragma_param.
1847 (c_parser_external_declaration): Adjust
1848 c_parser_declaration_or_fndef caller.
1849 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1850 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1851 Adjust recursive call.
1852 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1853 of pragma_external.
1854 (c_parser_parameter_declaration): Use pragma_param instead of
1855 pragma_external.
1856 (c_parser_compound_statement_nostart, c_parser_label,
1857 c_parser_for_statement): Adjust
1858 c_parser_declaration_or_fndef callers.
1859 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1860 it through to c_parser_conditional_expression.
1861 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1862 pass it through to c_parser_binary_expression. Adjust recursive
1863 call.
1864 (c_parser_binary_expression): Remove prec argument, add
1865 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1866 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1867 binop matches it, use build2 instead of parser_build_binary_op.
1868 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1869 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1870 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1871 Handle pragma_struct and pragma_param the same as pragma_external.
1872 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1873 (c_parser_omp_variable_list): Parse array sections for
1874 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1875 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1876 (c_parser_omp_clause_reduction): Handle user defined reductions.
1877 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1878 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1879 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1880 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1881 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1882 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1883 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1884 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1885 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1886 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1887 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1888 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1889 (c_parser_omp_for_loop): Add CODE argument, pass it through
1890 to c_finish_omp_for. Change last argument to cclauses,
1891 and adjust uses to grab parallel clauses from the array of all
1892 the split clauses. Adjust c_parser_binary_expression,
1893 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1894 (omp_split_clauses): New function.
1895 (c_parser_omp_simd): New function.
1896 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1897 Allow the function to be called also when parsing combined constructs,
1898 and call c_parser_omp_simd when parsing for simd.
1899 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1900 #pragma omp section, require exactly one structured-block instead of
1901 sequence of statements.
1902 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1903 Allow the function to be called also when parsing combined constructs.
1904 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1905 Allow the function to be called also when parsing combined
1906 constructs.
1907 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1908 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1909 c_parser_omp_teams, c_parser_omp_target_data,
1910 c_parser_omp_target_update, c_parser_omp_target,
1911 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1912 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1913 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1914 (c_parser_omp_construct): Add p_name and mask vars. Handle
1915 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1916 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1917 and c_parser_omp_sections callers.
1918 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1919 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1920 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1921 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1922 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1923 OMP_CLAUSE_DEPEND.
1924 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1925 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1926 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1927 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1928 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1929 * c-typeck.c: Include tree-inline.h.
1930 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1931 handle_omp_array_sections_1, handle_omp_array_sections,
1932 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1933 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1934 user defined reductions.
1935 (c_tree_equal): New function.
1936 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1937 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1938 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1939 c_check_omp_declare_reduction_r): New prototypes.
1940 * c-decl.c (current_omp_declare_target_attribute): New variable.
1941 (c_decl_attributes): New function.
1942 (start_decl, start_function): Use it instead of decl_attributes.
1943 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1944 c_omp_reduction_decl, c_omp_reduction_lookup,
1945 c_check_omp_declare_reduction_r): New functions.
1946
3ce7d1bd 19472013-09-25 Tom Tromey <tromey@redhat.com>
1948
1949 * Make-lang.in (c/gccspec.o): Remove.
1950 (CFLAGS-c/gccspec.o): New variable.
1951 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1952 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1953 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1954
96da1c1d 19552013-09-25 Tom Tromey <tromey@redhat.com>
1956
1957 * Make-lang.in (c/gccspec.o): Don't use subshell.
1958
1b309377 19592013-09-18 Marek Polacek <polacek@redhat.com>
1960
1961 PR sanitize/58443
1962 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1963 Remove unnecessary check.
1964
05f893e1 19652013-09-18 Marek Polacek <polacek@redhat.com>
1966
1967 PR sanitizer/58411
1968 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1969 no_sanitize_undefined attribute.
1970
bda0b9d2 19712013-09-13 Kai Tietz <ktietz@redhat.com>
1972
1973 PR target/57848
1974 * c-decl.c (c_builtin_function_ext_scope): Remove
1975 wrong assumption that it is never called on prexisting
1976 symbol.
1977
73437615 19782013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1979
1980 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1981
eaab24b9 19822013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1983
1984 * c-objc-common.c (c_tree_printer): Tidy.
1985
9e46467d 19862013-08-30 Marek Polacek <polacek@redhat.com>
1987
1988 * c-typeck.c (build_binary_op): Add division by zero and shift
1989 instrumentation.
1990
f8234178 19912013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 1992 Joseph Myers <joseph@codesourcery.com>
f8234178 1993
c90a7d10 1994 PR c/35649
f8234178 1995 * c-typeck.c (c_common_type): Prefer double_type_node over
1996 other REAL_TYPE types with the same precision.
1997 (convert_arguments): Likewise.
1998
6f07f480 19992013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2000
2001 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2002 (c_initialize_diagnostics): Call a destructor for the early printer.
2003
eed6bc21 20042013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2005
2006 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2007 printer initialization.
2008
57717943 20092013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 2010
57717943 2011 PR c/57490
2012 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2013 check for truth values.
2014 (expand_array_notation_exprs): Added truth values case. Removed an
2015 unwanted else. Added for-loop to walk through subtrees in default
2016 case.
2017
a94db6b0 20182013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2019
2020 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2021
e76163a9 20222013-07-23 Joseph Myers <joseph@codesourcery.com>
2023
2024 * c-parser.c (struct c_generic_association): Fix typo.
2025
7aa04c8d 20262013-07-23 Tom Tromey <tromey@redhat.com>
2027 Joseph Myers <joseph@codesourcery.com>
2028
2029 * c-parser.c (struct c_generic_association): New.
2030 (c_generic_association_d): New typedef.
2031 (c_parser_generic_selection): New function.
2032 (c_parser_postfix_expression): Handle RID_GENERIC.
2033
76bbe4ca 20342013-07-13 Jason Merrill <jason@redhat.com>
2035
2036 PR c++/57793
2037 * c-decl.c (finish_struct): Check for too-large class.
2038
21ebaa24 20392013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 2040
2041 PR c/57821
2042 * c-typeck.c (set_init_index): When folding, check for index overflow.
2043
936c3081 20442013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2045
2046 * c-parser.c (c_parser_array_notation): Removed rejection of array
2047 notations in an array of function pointers.
2048
50acebe0 20492013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2050
2051 * c-array-notation.c (make_triplet_val_inv): New function.
2052 (create_cmp_incr): Likewise.
2053 (create_array_refs): Likewise.
2054 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2055 Also modularized common parts between functions and called the function.
2056 (build_array_notation_expr): Likewise.
2057 (fix_conditional_array_notations_1): Likewise.
2058 (fix_array_notation_expr): Likewise.
2059 (fix_array_notation_call_expr): Likewise.
2060
01e6cdb4 20612013-06-18 Marek Polacek <polacek@redhat.com>
2062
2063 PR c/57630
2064 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2065
6a3adac6 20662013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2067
2068 * c-array-notation.c (build_array_notation_expr): Reject array notation
2069 mismatch between LHS and RHS even inside a call_expr. Also, removed
2070 a couple while statements that were dead code.
2071
62aab3f3 20722013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2073
2074 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2075 excessive precision expressions in function parameters. Also removed
2076 couple unwanted while statements.
2077
bfc83720 20782013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2079
2080 * c-array-notation.c (expand_array_notation_exprs): Added
2081 ARRAY_NOTATION_REF case.
2082
09970d67 20832013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2084
2085 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2086 function to c-family/array-notation-common.c.
2087 (is_cilkplus_reduce_builtin): Likewise.
2088 (find_rank): Likewise.
2089 (extract_array_notation_exprs): Likewise.
2090 (replace_array_notations): Likewise.
2091 (find_inv_trees): Likewise.
2092 (replace_inv_trees): Likewise.
2093 (contains_array_notation_expr): Likewise.
2094 (find_correct_array_notation_type): Likewise.
2095 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2096 (struct inv_list): Moved this to c-family/array-notation-common.c.
2097 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2098
6e13bc01 20992013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2100
2101 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2102 reduction functions outside the for-loop. Added a check if the fundecl
2103 is non-NULL. Finally, removed an unwanted if-statement, and made the
2104 body unconditional.
2105
cc92dddc 21062013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2107
2108 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2109 condition of the if-statement matches the rank of else-block and then-
2110 block when array notations are used.
2111 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2112 expression after the entire function body is parsed.
2113 (c_parser_expr_no_commas): Delayed creating array notation expressions
2114 to the end of function parsing.
2115 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2116 whole if-statement instead of just the condition.
2117 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2118
eddc63fd 21192013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2120
2121 PR c/57474
2122 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2123 array to NULL_TREE if they are unused. Also added a check for the
2124 field to be NULL before its fields are used in future.
2125
a2115a4a 21262013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2127
2128 PR bootstrap/57450
2129 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2130 (build_array_notation_expr): Likewise.
2131
3c6d4197 21322013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2133
2134 * c-typeck.c (build_array_ref): Added a check to see if array's
2135 index is greater than one. If true, then emit an error.
2136 (build_function_call_vec): Exclude error reporting and checking
2137 for builtin array-notation functions.
2138 (convert_arguments): Likewise.
2139 (c_finish_return): Added a check for array notations as a return
2140 expression. If true, then emit an error.
2141 (c_finish_loop): Added a check for array notations in a loop
2142 condition. If true then emit an error.
2143 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2144 (build_binary_op): Added a check for array notation expr inside
2145 op1 and op0. If present, we call another function to find correct
2146 type.
2147 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2148 * c-parser.c (c_parser_compound_statement): Check if array
2149 notation code is used in tree, if so, then transform them into
2150 appropriate C code.
2151 (c_parser_expr_no_commas): Check if array notation is used in LHS
2152 or RHS, if so, then build array notation expression instead of
2153 regular modify.
2154 (c_parser_postfix_expression_after_primary): Added a check for
2155 colon(s) after square braces, if so then handle it like an array
2156 notation. Also, break up array notations in unary op if found.
2157 (c_parser_direct_declarator_inner): Added a check for array
2158 notation.
2159 (c_parser_compound_statement): Added a check for array notation in
2160 a stmt. If one is present, then expand array notation expr.
2161 (c_parser_if_statement): Likewise.
2162 (c_parser_switch_statement): Added a check for array notations in
2163 a switch statement's condition. If true, then output an error.
2164 (c_parser_while_statement): Similarly, but for a while.
2165 (c_parser_do_statement): Similarly, but for a do-while.
2166 (c_parser_for_statement): Similarly, but for a for-loop.
2167 (c_parser_unary_expression): Check if array notation is used in a
2168 pre-increment or pre-decrement expression. If true, then expand
2169 them.
2170 (c_parser_array_notation): New function.
2171 * c-array-notation.c: New file.
2172 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2173
2c1c8a2c 21742013-05-23 Mike Stump <mikestump@comcast.net>
2175
2176 * c-typeck.c (convert_for_assignment): Handle references to memory
2177 spaces better.
2178
be5f9e46 21792013-05-16 Jason Merrill <jason@redhat.com>
2180
2181 * Make-lang.in (cc1$(exeext)): Use link mutex.
2182
9205a6cc 21832013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2184
2185 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2186 to simply use OPT_Wpointer_arith.
2187 (build_unary_op): Likewise.
2188
0b049e15 21892013-04-03 Jakub Jelinek <jakub@redhat.com>
2190
2191 PR c/19449
2192 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2193 argument. If set, or it temporarily for parsing of the first
2194 argument into force_folding_builtin_constant_p.
2195 (c_parser_postfix_expression): Adjust callers.
2196
8e966116 21972013-03-21 Richard Biener <rguenther@suse.de>
2198
2199 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2200 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2201
b862f263 22022013-02-12 Marek Polacek <polacek@redhat.com>
2203
2204 PR c/44938
2205 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2206 origtypes to NULL.
2207
54550ecb 22082013-01-24 Jakub Jelinek <jakub@redhat.com>
2209
2210 PR c/56078
2211 * c-typeck.c (set_nonincremental_init_from_string): If
2212 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2213 returned false.
2214 (process_init_element): Likewise.
2215
035b65e2 22162012-12-20 Jakub Jelinek <jakub@redhat.com>
2217
2218 PR c++/55619
2219 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2220 argument, don't call default_function_array_conversion
2221 nor c_fully_fold here.
2222 (c_parser_asm_statement): Adjust callers.
2223 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2224 and outputs here, and call default_function_array_conversion
2225 on inputs that don't need to be addressable.
2226
7cbb7f1a 22272012-12-18 Jakub Jelinek <jakub@redhat.com>
2228
2229 PR c/39464
2230 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2231 warning require that both c_common_unsigned_type as well as
2232 c_common_signed_type is the same for both mvl and mvr types.
2233
f1f41a6c 22342012-11-16 Diego Novillo <dnovillo@google.com>
2235
2236 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2237
2238 * c-common.c: Use new vec API in vec.h.
2239 * c-common.h: Likewise.
2240 * c-gimplify.c: Likewise.
2241 * c-pragma.c: Likewise.
2242 * c-pretty-print.c: Likewise.
2243 * c-pretty-print.h: Likewise.
2244 * c-semantics.c: Likewise.
2245 * c-decl.c: Likewise.
2246 * c-parser.c: Likewise.
2247 * c-tree.h: Likewise.
2248 * c-typeck.c: Likewise.
2249
8b447d3f 22502012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2251
2252 PR c++/54930
2253 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2254
08fc5390 22552012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2256
2257 PR c/53066
2258 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2259 shadows a function, unless the variable is a function or a
2260 pointer-to-function.
2261
57f872a2 22622012-10-12 Jakub Jelinek <jakub@redhat.com>
2263
2264 PR c/54381
2265 * c-parser.c (struct c_tree_loc_pair): Removed.
2266 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2267 add location_t * and tree * arguments, fill in array of 3
2268 sizeof_arg trees and corresponding locs.
2269 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2270 c_parser_expr_list callers.
2271 (c_parser_postfix_expression_after_primary): Likewise. Pass
2272 array of 3 sizeof_arg trees and locs (corresponding to first
2273 3 arguments) to sizeof_pointer_memaccess_warning.
2274
d1455aa3 22752012-10-09 Lawrence Crowl <crowl@google.com>
2276
2277 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2278 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2279 hash table.
2280
b0e7825e 22812012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2282
2283 PR c++/54194
2284 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2285 call.
2286
41ed701a 22872012-10-09 Marc Glisse <marc.glisse@inria.fr>
2288
2289 PR c++/54427
2290 * c-typeck.c: Include c-common.h.
2291 (enum stv_conv): Moved to c-common.h.
2292 (scalar_to_vector): Moved to c-common.c.
2293 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2294 * Make-lang.in: c-typeck.c depends on c-common.h.
2295
ef34afc1 22962012-10-04 Arnaud Charlet <charlet@adacore.com>
2297
2298 * c-decl.c (c_write_global_declarations): Fix handling of
2299 -fdump-ada-spec*.
2300
7bd765d4 23012012-09-30 Sharad Singhai <singhai@google.com>
2302
2303 * c-decl.c (c_write_global_declarations): Use a different method
2304 to determine if the dump has ben initialized.
2305
c4b1a13a 23062012-09-14 Joseph Myers <joseph@codesourcery.com>
2307
2308 PR c/54552
2309 * c-typeck.c (c_cast_expr): When casting to a type requiring
2310 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2311 c_fully_fold first.
2312
bb554051 23132012-09-14 Joseph Myers <joseph@codesourcery.com>
2314
2315 PR c/54103
2316 * c-typeck.c (build_unary_op): Pass original argument of
2317 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2318 any C_MAYBE_CONST_EXPR, if it has integer operands.
2319 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2320 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2321 to c_objc_common_truthvalue_conversion, then remove any
2322 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2323 c_objc_common_truthvalue_conversion not
2324 c_common_truthvalue_conversion.
2325 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2326 call note_integer_operands for arguments with integer operands
2327 that are not integer constants.
2328
c708c6ef 23292012-09-13 Jakub Jelinek <jakub@redhat.com>
2330
2331 PR c/54559
2332 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2333 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2334
cce20430 23352012-08-31 Jakub Jelinek <jakub@redhat.com>
2336
2337 PR c/54428
2338 * c-convert.c (convert): Don't call fold_convert_loc if
2339 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2340 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2341 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2342
a90d57ed 23432012-08-24 Jakub Jelinek <jakub@redhat.com>
2344
2345 PR c/54355
2346 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2347 for nested and empty_ok arguments in the call to
2348 c_parser_declaration_or_fndef.
2349
f003f5dc 23502012-08-17 Jakub Jelinek <jakub@redhat.com>
2351
2352 * c-tree.h (c_last_sizeof_arg): Declare.
2353 * c-parser.c (struct c_tree_loc_pair): New type.
2354 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2355 non-NULL.
2356 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2357 (c_parser_postfix_expression_after_primary): Likewise. Call
2358 sizeof_pointer_memaccess_warning if needed.
2359 (sizeof_ptr_memacc_comptypes): New function.
2360 * c-typeck.c (c_last_sizeof_arg): New global variable.
2361 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2362
a5656b73 23632012-07-24 Uros Bizjak <ubizjak@gmail.com>
2364
2365 * c-lang.h (lang_decl): Add variable_size GTY option.
2366
b9ed1410 23672012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2368
2369 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2370 * Make-lang.in: Fix dependencies.
2371
e53d55e7 23722012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2373
2374 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2375 and add language Makefile hooks.
2376 * config-lang.in: New file.
2377 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2378 add the required "normal" config-lang.in rules.
2379 * c-lang.h: Moved from gcc/ to here.
2380 * c-tree.h: Likewise.
2381 * c-objc-common.c: Likewise.
2382 * c-objc-common.h: Likewise.
2383 * c-typeck.c: Likewise.
2384 * c-convert.c: Likewise.
2385 * c-lang.c: Likewise.
2386 * c-aux-info.c: Likewise.
2387 * c-errors.c: Likewise.
2388 * gccspec.c: Likewise.
2389 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2390 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2391\f
d353bf18 2392Copyright (C) 2012-2015 Free Software Foundation, Inc.
e53d55e7 2393
2394Copying and distribution of this file, with or without modification,
2395are permitted in any medium without royalty provided the copyright
2396notice and this notice are preserved.