Menu

#881 va_arg on the 64-bit version

closed
nobody
None
compiler
2019-04-20
2018-05-23
John Turner
No

When I try to go to the 64-bit compiler it objects to my use of the va_arg / va_first / va_next functions. Maybe I installed it wrong? Using FreeBASIC-1.05.0-win64
error 285: Unsupported statement in -gen gcc mode in 'arg = Va_first()'

Related

Feature Requests: #46

Discussion

  • John Turner

    John Turner - 2018-05-23

    When I try to go to the 64-bit compiler it objects to my use of the va_arg / va_first / va_next functions. Maybe I installed it wrong? Using FreeBASIC-1.05.0-win64
    error 285: Unsupported statement in -gen gcc mode in 'arg = Va_first()'

     
  • fxm (freebasic.net)

    Yes, these are not supported when using gcc (see documentation).
    As fbc 64-bit always uses gcc, that don't work with fbc 64-bit.
    Only working with fbc 32-bit when using gas (default configuration).

     
  • John Turner

    John Turner - 2018-05-24

    Thanks - that was what I suspected. I cannot see where in the documentation it says they are not supported in the 64-bit version.
    Is it planned to support them in the future? A function call with an infinitely-variable number of parameters is very useful and I have many base functions using this technique.

     
  • Jeff Marshall

    Jeff Marshall - 2019-04-20

    Support for variadic functions added in commit [062fff] for fbc version 1.07.0

    New API has been added using:
    CVA_LIST
    CVA_ARG()
    CVA_START()
    CVA_COPY()
    CVA_END()

    There are, no plans to support VA_FIRST(), VA_NEXT(), VA_ARG() on 64-bit version. These macros depend on arguments passed on stack only and won't be modified to handle arguments passed by register.

     

    Related

    Commit: [062fff]

  • Jeff Marshall

    Jeff Marshall - 2019-04-20
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB