SDFileSystem and PokittoDisk not working 100% with latest library

:scream: :scream: :scream:



Out of all the stuff that I find questionable about Arduino, this one takes the cake.

I’ve been reading a few (there are hundreds) topics on the subject of “Arduino fpermissive” and was shocked to find this was a 2016 change in the IDE - if I understood correctly - to make old libraries compile without errors by demoting them to warnings.

So for example someone was compiling code with millis; (forgot brackets), and it compiled with no error

Unbelievable. In 2016.

Not only were the early choices of Arduino dubious, they seem determined not to redeem themselves.


It took me a while to formulate a proper response because I was in such hysterics.

The idea that someone might have sat down and said:
“Our code can’t possibly be broken, clearly it’s the compiler at fault, how do we make the compiler not-broken.” XD
Or “Fixing all this code is going to be really annoying, can’t we just tell the compiler to pretend it works?”

It’s times like this that you really have to laugh,
because the alternative would be utter despair, and that would rather spoil the evening. :P

Thankfully we don’t have to worry about that since we’re using an ARM processor with a library written by competent programmers. Add an IDE that looks to be developed by gods and we have an easy to learn, fun to master, environment to work in.

Bonus points for a community that’s very enthusiastic about helping beginners that aren’t just new to the system, but new to c++ in general.


Quite a while back, I looked into what it would take to be able to compile Arduboy sketches, in the Arduino IDE, without -fpermissive. It turns out that it’s fairly easy to do with a custom boards package, like the Arduboy uses. It could even be make a selectable option. When you chose board type Arduboy there could be an additional option added for something like Error Detection with choices Standard or Stricter. The Stricter selection would remove -fpermissive.

This kind of got put on the back burner behind a long list of other things I’ve been meaning to get to. :frowning_face:


I’d also welcome an option to use -std=c++11 (or one of the later standards),
mainly to avoid the GCC-specific compiler extensions,
because those also do non-standard things (some of which are less desirable than others).

Have you considered making issues (and/or maybe project boards) that record some of the intended features,
and then perhaps creating a sort of ‘open invitation’ for people who want to take a crack at implementing some of the features?

Most of the things that I’ve put ahead of this aren’t related to the Arduboy.

A friend of mine is struggling at work with an Arduino reading a position sensor of a device, right now.

His problems are related to the fact that he makes syntactical errors due to just not knowing (for example = vs ==).

Arduino IDE just lets many of those mistakes through, and happily compiles the code. I’ve been following the process and thinking “wtf?” and now I know. Its -fpermissive

The guy says “well, its just me, I don’t know how to write proper code” and I keep telling him it is the actual job of the compiler to warn and stop errors from happening.

With a friend like Arduino IDE, who needs enemies :sweat:


Precisely. Error messages and warnings are not the enemy,
they’re the compiler’s way of kindly suggesting you point the gun away from your foot.

In fairness, that’s one that can’t be blamed on -fpermissive.
Some compilers might emit a warning, but it’s completely legal to do something like:

if(x = y)

Worse than being legal though, there are people who regularly do that kind of thing as a form of shorthand.

I can’t find a specific example, but I’ve seen code like:

non_standard_string line;
while(line = getline())
    // Do something with line

Which abuses the ability to have a operator bool as a way to test whether the string is empty.
(Or something along those lines.)

Personally if I were to design a programming language (which I was a few weeks/months ago),
I’d make that kind of thing illegal by disallowing = in an expression.
(The real solution would probably be to invent a new idiom.)