Skip to content

[BUG] true/false always redefined if stdbool.h and Arduino.h are both included when using C. #1570

Closed
@xxxajk

Description

@xxxajk

Arduino.h always defines true and false, the trouble occurs when you use C, and include stdbool.h. Arduino.h should simply include stdbool.h instead of defining these for C code, and only define them if using C++.

Details: this seems to happen only for C code, not C++ or a sketch. I have situations where I write a library with mixed C and C++. This causes GCC to emit redefinition warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CoreRelated to the code for the standard Arduino API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions