Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » MSPGCC
  • » [Mspgcc-users] Do VLAs conflict with variadic functions in mspgcc v 3.2.3 ? [RSS Feed]

#1 Dec. 27, 2010 14:57:18

Peter B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] Do VLAs conflict with variadic functions in mspgcc v 3.2.3 ?


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 athttps://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 <alex***@*mail.com> 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;
> int i;
>
> va_list arguments;
> va_start( arguments, string );
>
> for( i = 0; i < length; i++ ) {
>
> while( !(IFG2 & UCA0TXIFG) );
> UCA0TXBUF = string;
>
> }
>
> va_end( arguments );
>
> while( UCA0STAT & UCBUSY );
> delay50usec;
>
> }
>
>
>
> Mspgcc-users mailing list
> Mspgcc-us***@*ists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/mspgcc-users>
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/mspgcc-users

Offline

  • Root
  • » MSPGCC
  • » [Mspgcc-users] Do VLAs conflict with variadic functions in mspgcc v 3.2.3 ? [RSS Feed]

Board footer

Moderator control

Enjoy the 16th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support