Michael Schwingen wrote:
> Dick Hollenbeck wrote:
>   
>> I nak the arrays.  I hate them, they are a crash waiting to happen.
>>   
>>     
> Why?
>
>   
>> Put the same logic into a series of switches please, nested if necessary.
>>
>> Switches reads better, and are less subject to breakage.  We just 
>> changes the values of the #defines in the last 10 minutes, this kind of 
>> change breaks these tables in the future.
>>   
>>     
> That could be worked around by using C99 initializers. I am not fond of
> replacing a small amount of static data with a bigger chunk of code.
>   

Are you thinking it is bigger because it looks bigger in your editor, or 
bigger because it generates more code?    Switch statements can be 
handled quite efficiently by the compiler if the case statements are of 
contiguous values, and I believe that is the case we are talking about.


C99:  are you saying use #defines as the array indices in the initializers?
That could be an acceptable alternative.


I can't believe we have to send 5 emails to move this project forward on 
something so trivial.  It is amusing, and pretty much way too expensive 
for me.


Somebody please tell me to get back to work!


Thanks,

Dick

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to