Skip to content

register deprecated error with clang #102

@Slechtvalk

Description

@Slechtvalk

Hi, I got this error when compiling ArduinoJSON on FreeBSD 10.2 (CLang) 👍

/opslag/home/oldenburgh/techniek/Variosystem/software/swexternals/software/extern/json/ArduinoJson/src/Internals/JsonParser.cpp:19:3: error: 'register' storage class specifier is deprecated [-Werror,-Wdeprecated-register]
register const char *ptr = skipSpacesAndComments(_readPtr);
^~~~~~~~~
1 error generated.

I think the solution is one of these

  1. drop the register keyword.

2.use a pragma to turn of the error on clang, like
#pragma clang diagnostic push

pragma clang diagnostic ignored "-Wdeprecated-register"

< json code >

pragma clang diagnostic pop

Greetings,

Ewout Boks

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions