need of a blank line in sketch?

I work with IDE 1.6.9 (did not test with other versions)

I have the following sketch in two .ino-files:

  1. .ino-file (the main one):
/*
 * comment
 */
  1. .ino-file:
const byte var = 1;

void setup(){
  sub1();
}

void loop(){
}

void sub1(){
}

without(!) any blank line before the var declaration.

This generates an error: "'sub1' was not declared in this scope"

Why this?

If I:
++ change the block comment in the 1. .ino-file to "// comment"
++ OR insert a blank line in the 2. ino-file before the declaration of the byte variable var
++ OR delete the declaration of the byte variable var (it is not used in the sketch)
++ OR declare the sub1() before setup()
++ OR put an line comment right after the var declaration
++ OR ....

the error disappears!(?!?!?)

It does NOT disappear with blank line(s) after the comment-block in the 1. .ino-file.

Crazy? Compiler bug?

Enable verbose mode when compiling. Look at the cpp file that the IDE creates from your .ino file. All your questions will be answered.

The prototype generator managed to put the prototypes inside the comment:

#include <Arduino.h>
#line 1 "/var/folders/sl/3x4zr7v14j5d_8xznyys7tjc0000gn/T/arduino_modified_sketch_558229/sketch_may14a.ino"
#line 1 "/var/folders/sl/3x4zr7v14j5d_8xznyys7tjc0000gn/T/arduino_modified_sketch_558229/sketch_may14a.ino"

/*
 * comment
#line 4 "/var/folders/sl/3x4zr7v14j5d_8xznyys7tjc0000gn/T/arduino_modified_sketch_558229/two.ino"
void setup();
#line 8 "/var/folders/sl/3x4zr7v14j5d_8xznyys7tjc0000gn/T/arduino_modified_sketch_558229/two.ino"
void loop();
#line 11 "/var/folders/sl/3x4zr7v14j5d_8xznyys7tjc0000gn/T/arduino_modified_sketch_558229/two.ino"
void sub1();
#line 4 "/var/folders/sl/3x4zr7v14j5d_8xznyys7tjc0000gn/T/arduino_modified_sketch_558229/two.ino"
 */

 
#line 1 "/var/folders/sl/3x4zr7v14j5d_8xznyys7tjc0000gn/T/arduino_modified_sketch_558229/two.ino"

const byte var = 1;

void setup(){
  sub1();
}

void loop(){
}

void sub1(){
}

What are you trying to achieve with

void setup(){
  sub1();
}

If you are trying to define a function called sub1() that is the wrong place to do it. It should be outside other functions.

...R