-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ctl breaks <complex.h> and uses reserved identifiers (longer internal names are required) #13
Comments
lol fixed |
@glouw, would you be interested in a PR to namespace internal functions/macros (and fix the use of reserved identifiers)? |
@HalosGhost Yes, please. I've had many such requests to fix the global namespacing but considering we have a core group of industry users in the wild it's imperative we don't break the defines in ctl.h, or the usage of #define P or #define T. Anything internal like I think that will remove most of the clutter. The fix for @camel-cdr's request was to rename #define I to #define Z, which while being the wrong fix, was the right fix given my time constraints :P |
That makes a lot of sense. I have a few things going on right now, so no promises on timeline, but I'll take a crack at it when I have a moment! |
@glouw, random question here. One of the reserved-identifier checks I always make is use of Practically speaking, this is very unlikely to ever be a problem for anyone, but I wanted to ask if you think it makes sense for me to consider potential solutions. Let me know; either way, there are other things for me to look at first. ☺ |
You could typedef |
That makes a lot of sense. On further thought, CTL already supports defining the resulting type name anyway, so that's more of a “if you were worried about that level of posix compliance, you should use the mechanism already built-in to support it” case than anything else. ☺ |
If you use
<complex.h>
before you include a file from ctl you'll get name collisions for theI
macro.I generally recommend using longer names or a prefix like
CTL_I
,CLT_A
...This also applies to
clt.h
, since names likeCAT
are often used by other code.You should also consider using different include guards, since e.g.
__CTL_H__
is a reserved identifier, because it begins with two underscores.The text was updated successfully, but these errors were encountered: