Igor Skochinsky wrote:
> Hello Dick,
>
> Thursday, April 30, 2009, 4:28:54 AM, you wrote:
>
>
>   
>>> Due to the lack of prior opposition, I had been debating whether to
>>> simply commit a change that adds -std=c99 and seeing how the community
>>> reacts (since I can now revert it quickly if it poses a real problem). 
>>>   
>>>       
> DH> The -std=c99 option is a big positive for me.   I like it.  There are C
> DH> compilers and there are C++ compilers.  In the C compiler realm, it is
> DH> difficult to surpass GNU GCC and mingw and cygwin hosted forms.  So I 
> DH> have lost all enthusiasm for trying to support another C compiler, 
> DH> because it means dumbing down the code.
>
> DH> In the realm of C++ compilers, there is probably less reason to take 
> DH> this stance, since C++ compilers are all pretty capable, and you would
> DH> not have to dumb down the code.
>
> DH> So this command line option is a very good idea in my opinion.  We are
> DH> already programming on our hands and knees by choosing to use C.   At 
> DH> least this gives us knee pads.   Someday maybe we'll actually get up and
> DH> program on our feet.
>
> So far the only C99 features I encountered were:
>
> 1) variables declared in the middle of a block
> 2) designated initializers (.field = value in structures)
> 3) variadic macros
>
> 3 is supported by MSVC. 1 can be convenient, but is not used that
> much in the source so far - most variables are still declared at the
> start of the block. 2 makes some structure definitions more
> compact, but really, is it that much harder to write
>        /* name */               "cfi",
>        /* register_commands */  cfi_register_commands,
>        /* flash_bank_command */ cfi_flash_bank_command,
> than
>        .name = "cfi",
>        .register_commands = cfi_register_commands,
>        .flash_bank_command = cfi_flash_bank_command,
> ?
>
> What are the _real_ benefits, not conveniences, that that switch can
> bring?
>   

Igor,

Why do you feel it is necessary to support MSVC?  Mingw during runtime 
is lean, a very thin layer, and one that comes from Microsoft.  There is 
nothing to install for the runtime requirements.  There is already on 
the windows box the required DLL, I believe it is called MSVCRTD.DLL or 
similar.

There will be no speed advantage since the cable is the bottle neck.

Mingw is an excellent runtime setup.  I do not know if windows openocd 
requires msys or cygwin at runtime.  But in theory it would be easy to 
remove that dependency if it exists, leaving you with only MSVCRTD.DLL.  
And that DLL usually comes with Windows.  How easy is that?  What is the 
problem with gnu gcc in the form of mingw-gcc that you are running away 
from?

As I said before, I personally would be willing to give up designated 
initializers, but really nothing more within C99.  And I really love the 
iterator type stuff:

for( int i=0;  i<7;  ++i)

where i is declared within the for loop.


Sorry I have lost most of my enthusiasm, but I don't understand your 
problem probably.  Please explain if you can.

Dick

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to