-
Notifications
You must be signed in to change notification settings - Fork 37
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
Repeated declarations cause problems #138
Comments
Hmm, interesting.
It's a bug in DStep. |
I have emailed the the list on which the libdvbv5 people operate to try and get a fix. Even if they fix tomorrow and release, it will be ages before it gets to mainstream distributions. And given the glacial speed of progress of the Travis-CI folk it may get there by 2038. |
Ok, I see. But it's definitely a bug in DStep. I didn't know this was allowed in C code. Is it due to |
As far as I am aware you can any number of declarations for a symbol in C and C++ as long as they are mutually consistent. Only if a declaration disagrees with a previous declaration is it an error. It turns out you have to be able to do this because of #include. |
Right, that makes sense. Just after my rant of how |
Seems to only apply to functions without a body and |
I'm mean, isn't that why include guards (or whatever they're called) are used? |
Many header files may have to include forward declarations, so given the arbitrary code created by an include tree you can end up with many forward declaration is the compilation. This is very true in the libdvbv5 code, lots of forward declarations, many include files. |
Fix #138: Repeated declarations cause problems.
In /usr/include/libdvbv5/dvb-fe.h there are two instances of:
in the C (and C++) header files this is not a problem (though I am going to report this as a bug). This leads to two lines:
in the generated by DStep dvb_fe.d. Sadly this leads to compilation errors:
Is this a bug in DStep or a bug in ldc2?
The text was updated successfully, but these errors were encountered: