I suspect this is a bug. While working on the uniarch stuff I found that
the msp430 back end is configured to disable frame pointer support, which
may or may not be relevant.
If you'd be so kind as to file a msp430 project bug tracker entry at
https://sourceforge.net/tracker/?group_id=42303&atid=432701, I'll see if I
can get it to work in mspgcc4 and uniarch. (I don't maintain mspgcc 3.x,
but you could probably back-port the patch if you need it in that
environment.)
Peter
On Fri, Dec 24, 2010 at 8:13 PM, Alex Shibakov <[email protected]> wrote:
> Hi everybody!
>
> Does someone know the answer to the question above? More specifically,
> in the function below, if I uncomment the array declaration, I get
> either garbage or no output at all. With it commented out, the
> function works fine. I cannot find anything in either gcc manual or
> C99 standard to indicate that vla's and variadic functions cannot mix.
>
> An almost identical version (with putchar instead of UCA...) compiled
> with gcc 4.3.2 on my Linux box works fine either way. Yes, I disabled
> all the optimizations in both cases.
>
> Thanks
>
> void vla_variadic_test( int length, char *string, ... ) {
>
> // char array[length];
> int i;
>
> va_list arguments;
> va_start( arguments, string );
>
> for( i = 0; i < length; i++ ) {
>
> while( !(IFG2 & UCA0TXIFG) );
> UCA0TXBUF = string[i];
>
> }
>
> va_end( arguments );
>
> while( UCA0STAT & UCBUSY );
> delay50usec;
>
> }
>
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment,
> and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users