Skip to content

User #define clashes with automatically added headers #2289

Closed
@a3f

Description

@a3f

A sketch with this line here
#define s1 42
doesn't compile because it breaks the prototype at avr/include/string.h:129
extern char *strdup(const char *s1);
.
I don't use Arduino but I think s1 is not supposed to be a reserved identifier.
My suggestion would be using __s1 or_S1. I am not familiar enough with the app to suggest (let alone commit) a different order of processing the Arduino sketch to C++.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions