Skip to content

#line directive is placed at end of code line #7

Closed
@per1234

Description

@per1234

Using Arduino IDE Beta build 31 with Windows 7 64 bit

  1. Download https://github.com/Jomelo/LCDMenuLib2/archive/v1.0.1.zip
  2. Sketch > Include Library > Add .ZIP Library > Select the downloaded file > Open
  3. Tools > Board > Arduino/Genuino Uno
  4. File > Examples > LCDMenuLib2 > 00_beginners > LCDML_000_serialMonitor
  5. Sketch > Verify/Compile

Error output:

LCDML_000_serialMonitor:80:88: error: stray '#' in program

     Serial.begin(9600);                // start serial    

                                                                                        ^

LCDML_000_serialMonitor:80:89: error: 'line' does not name a type

     Serial.begin(9600);                // start serial    

                                                                                         ^

arduino-preprocessor -debug output:
https://gist.github.com/per1234/be01dbe7f6e3aa08b5775298b0c7c67c/raw/9002d3f23689badcaeddfc7de0507d1b332e66c6/arduino-preprocessor_debug_output.txt

The problem occurs at line 10184 of the output:

  const char g_LCDML_DISP_lang_0_var[] __attribute__((__progmem__)) = {"Information"}; #line 47 "E:\\Stuff\\misc\\electronics\\arduino\\libraries\\LCDMenuLib2-1.0.1\\examples\\00_beginners\\LCDML_000_serialMonitor\\LCDML_000_serialMonitor.ino"

Where the #line directive was incorrectly added at the end of the code line.

The issue does not occur with Arduino IDE 1.8.5 or Arduino IDE 1.8.6 Hourly Build 2017/11/13 11:33.

Originally reported by @Jomelo at http://forum.arduino.cc/index.php?topic=518385.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions