squirrel icon indicating copy to clipboard operation
squirrel copied to clipboard

reserved identifier violation

Open elfring opened this issue 9 years ago • 3 comments

I would like to point out that identifiers like "_SQUIRREL_H_" and "_SQVM_H_" do not fit to the expected naming convention of the C++ language standard. Would you like to adjust your selection for unique names?

elfring avatar Jun 13 '16 16:06 elfring

There isn't an expected naming convention of the c++ language standard. That certainly isn't one. That's Some Guy's Code Style Guide.

Here's examples of include guards pulled at random from some different compilers so you can see how standard it is.

#ifndef _GLIBCXX_VECTOR
#ifndef _VECTOR_
#ifndef _RWSTD_VECTOR_INCLUDED

zeromus avatar Jun 14 '16 00:06 zeromus

How do you think about to avoid that this software depends on undefined behaviour?

elfring avatar Jun 14 '16 05:06 elfring

On the list of undefined behaviours likely to strike or cause serious problems, this one is on a napkin stapled to a post-it note attached to the very end, written just above running the compiler within a blackhole's event horizon in another universe. Any one of the other #defines in the squirrel headers is more likely to cause problems.

zeromus avatar Jun 14 '16 05:06 zeromus