[IGSTK-Developers] Borland compiler and StateMachine macro

Luis Ibanez luis.ibanez at kitware.com
Tue Apr 19 12:33:26 EDT 2005



Hi Julien,


Given the central role of the State Machine on the toolkit
I rather not put a dummy variable on it just to cover for
the poor implementation of the Borland compiler.


I would rather drop support for Borland altogether...


Maybe a less invasive option is to put a "typedef"
(instead of having an extra byte)... something like


#ifdef __BORLAND__
   // This variable is added to support broken bcc compiler
   typedef char BorlandIsABadCompilerType;;;
#endif


Again, given the critical nature of IGSTK we should
continuously evaluate how much are we willing to convolute
the code just for supporting an extra compiler...



Put in perspective:  We are facilitating the use of broken
compiler for developers to write Image Guided Surgery
applications...    there is something wrong about that.

Is like helping patients to reuse defective syringes...



    Luis



--------------------
Julien Jomier wrote:

> Hi Luis,
> 
> bcc doesn't like the extra line either...
> 
> I propose to add the following lines at the end of the macro:
> 
> #ifdef __BORLAND__
>   // This variable is added to support broken bcc compiler
>   char mydummychartypeforbcc
> #endif
> 
> What do you think?
> 
> Julien
> 
> Luis Ibanez wrote:
> 
>>
>> Hi Julien,
>>
>> Thanks for looking into the Borland errors.
>>
>> This is interesting, specially since an empty
>> statement (e.g. an isolated ";" is supposed to
>> be acceptable anywhere...
>>
>> I wonder if Borland will be happier with:
>>
>>   private:
>>      ;
>>
>>
>> meaning that we add a couple of empty lines
>> to the declaration of the Macro.
>>
>> or... another option if to put an #ifdef BORLAND
>> in the macro...
>>
>> If you have a chance, could you please give it
>> a try to the extra blank line and let us know
>> what you find ?
>>
>>
>>    Thanks
>>
>>
>>      Luis
>>
>>
>> --------------------
>> Julien Jomier wrote:
>>
>>> Hi all,
>>>
>>> I was looking at the compiling error on bcc32 and found out that 
>>> Borland compiler doesn't like:
>>>
>>>   private: ;
>>>
>>> The problem comes from the macro
>>>
>>> igstkStateMachineMacro();
>>>
>>> This macro ends by: 'private:' so the semicolon at the end causes bcc 
>>> to report an error.
>>>
>>> We have two options (AFAIK):
>>>
>>> 1) write:
>>>   igstkStateMachineMacro()
>>>
>>> instead of
>>>
>>>   igstkStateMachineMacro();
>>>
>>> 2) Add something like: 'char dummy' at the end of the macro...
>>>
>>> I prefer the second option and maybe there is another alternative,
>>> let me know what you think,
>>>
>>> thanks,
>>>
>>> Julien
>>>
>>> _______________________________________________
>>> IGSTK-Developers mailing list
>>> IGSTK-Developers at public.kitware.com
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
>>>
>>>
>>
>>
>>
>>
>>
>>
> 
> 
> 






More information about the IGSTK-Developers mailing list