Notes |
|
(0030147)
|
Sean McBride
|
2013-01-16 14:01
|
|
Strange that my clang trunk dashboard (Rogue7) does not have any errors. It's using clang version 3.3 (trunk 170355). I'm updating it now to be even newer. What version are you using exactly? And on what OS? I'm on OS X. Perhaps it's less the compiler and more your /usr/include/alloca.h?
Anyway... what a ghastly file... :) Comments about MSDOS, wow! It seems to be at least partly autogenerated...
A better fix might be to remove the "#ifdef __GNUC__" case entirely... are there are VTK 6 supported systems that use GCC but don't have alloca.h? I doubt it these days... we could try such a patch on gerrit... |
|
|
(0030148)
|
kentwilliams
|
2013-01-16 14:05
|
|
Sean that is the output of Bison/BYacc -- it would make more sense to me if the original parser source file was in VTK with the option to re-generate it.
The problem comes down to this: CLang defined the GCC preprocessor symbols, and that works great to the extent that it also implements GCC features. This is a case where pretending to be GCC is a fail. |
|
|
(0030149)
|
Sean McBride
|
2013-01-16 14:14
|
|
I understand, but the bigger fail, IMHO, is:
#ifdef __GNUC__
#undef alloca
#define alloca __builtin_alloca
What's this for? Why assume gcc has #defined alloca? Why #undefine it? Why redefine it? Major code smell. We should just #include <alloca.h>. If it does not exist, then do the hacks, not vice versa.
No? |
|
|
(0030150)
|
kentwilliams
|
2013-01-16 14:52
|
|
Sean, couldn't agree more. Simpler is better.
#if HAVE_ALLOCA_H
#include <alloca.h>
#else
#define alloca __builtin_alloca
#endif |
|
|
(0030151)
|
Sean McBride
|
2013-01-16 14:55
|
|
Cool. I wasn't thinking to reduce it to that small, because I don't know how many of those other funky cases are actually needed...
Want me to match gerrit patch, or you will? |
|
|
(0030152)
|
kentwilliams
|
2013-01-16 16:32
|
|
Sean, go ahead. I've avoided VTK gerrit so far. The gobbledegook about alloca is there because it's part of the standard byacc boilerplate. All I know is that my original patch seemed to change what was already there the minimal amount.
It's actually interesting (for extremely nerdy values of 'nerdy') why this causes a problem: In LLVM/CLang the C Preprocessor seems to do more than textual substitution; macros get syntax checked. Not sure that's an improvement. |
|
|
(0030176)
|
Sean McBride
|
2013-01-17 14:52
|
|
So the HAVE_ALLOCA_H define comes from a few lines above, not some CMake check as I assumed... do you know how/where I could actually use CMake to find that it exists or not? |
|
|
(0030177)
|
kentwilliams
|
2013-01-17 15:28
(edited on: 2013-01-17 15:30) |
|
|
|
(0030235)
|
Sean McBride
|
2013-01-23 17:53
|
|
|
|
(0030281)
|
Sean McBride
|
2013-01-30 10:51
|
|
|
|
(0030282)
|
Marcus D. Hanwell
|
2013-01-30 11:28
|
|
Only Dave DeMarle (AFAIK) has privileges to do that. |
|
|
(0031240)
|
Dave DeMarle
|
2013-07-22 20:02
|
|
moving all "tabled" bugs into "backlog" category since "tabled" is no longer used. |
|
|
(0031950)
|
Dave DeMarle
|
2013-12-16 14:13
|
|
Will put this onto release-5.10 branch shortly |
|
|
(0033458)
|
Dave DeMarle
|
2014-10-02 11:05
|
|
|