Skip to content

wrong placement of arduino.h #1310

Closed
Closed
@holgerlembke

Description

@holgerlembke

My code begins with something like that

#if defined(__AVR_ATtiny85__) 
  const int Pin0 = 0;
#else
  const int Pin0 = 4;
#endif 

byte something;

Compiling it for any none AVR_ATtiny85 leads to an error due to wrong arduino.h placement into the if-else part.

Adding a dummy declaration at the start (in front of #if) omits the error... but a real fix would be better.

Metadata

Metadata

Assignees

Labels

Component: PreprocessorThe Arduino sketch preprocessor converts .ino files into C++ code before compilation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions