Skip to content

wrong placement of arduino.h #1310

@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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy