Skip to content

Compiler fatal error on valid Adafruit library multiline comment #598

@ghost

Description

Describe the bug
In the Adafruit IO library (Adafruit_Definitions.h), the following valid code

#define AIO_FEED_NAME_LENGTH                                                   \
  258 ///< Maximum length of an Adafruit IO Feed    \
                                  ///< Name; 128 + 1 + 128 for the group, a dot \
                                  ///< , and actual feed name.
#define AIO_DATA_LENGTH                                                        \
  45 ///< Maximum length of data sent/recieved from Adafruit IO
#define AIO_CSV_LENGTH                                                         \
  AIO_FEED_NAME_LENGTH + 4 ///< Maximum comma-separated-value length from \
                           ///< Adafruit IO

threw the following fatal errors:

c:\Users\jackr\Documents\Arduino\libraries\Adafruit_IO_Arduino\src/AdafruitIO_Definitions.h:128:7: error: multi-line comment [-Werror=comment]
258 ///< Maximum length of an Adafruit IO Feed \
^
c:\Users\jackr\Documents\Arduino\libraries\Adafruit_IO_Arduino\src/AdafruitIO_Definitions.h:134:28: error: multi-line comment [-Werror=comment]
AIO_FEED_NAME_LENGTH + 4 ///< Maximum comma-separated-value length from \
^
The compiler stopped with "Compilation error: Error: 13 INTERNAL: exit status 1"

The problem seems to go away if the backslashes at the end of the lines are removed.

Additional context
I submitted the above to the AdafruitIO forum and their response was (from Administrator brubell):
"I don't think Arduino sketches should throw errors at the end of a supported multiline comment, it seems to be be a bug within Arduino IDE 2.x Beta."

Metadata

Metadata

Assignees

Labels

conclusion: invalidIssue/PR not validtopic: codeRelated to content of the project itselftype: 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