Skip to content

VaList: Allow VaList::arg to fetch bool values #57794

Open
@dlrobertson

Description

@dlrobertson

Summary

VaList::arg::<bool>() should work.

Description

According to <stdbool.h> false is 0 and true is 1. As long as our encoding of bool is the same, we should allow VaList::arg::<bool>(). Since we take care of types smaller than an int in the codegen, this should work.

Related to: #44930

CC @alexcrichton @joshtriplett

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-FFIArea: Foreign function interface (FFI)C-enhancementCategory: An issue proposing an enhancement or a PR with one.F-c_variadic`#![feature(c_variadic)]`T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions