Hi, SDCC people!

> Do we need a separate macro? There will be a bump in the minor version
> > number anyway, so you could test for that (or test for the revision, as
> > I do to deal with old char getchar(void) vs current int getchar(void)).



> If besides a function modifier there will also be a command line option
> to globally select the old behavior, then I suggest to also create a
> macro. Otherwise I see no need for it.
>

Sounds reasonable.

Best regards,
Paul Beltyukov

вт, 29 июн. 2021 г. в 15:12, Maarten Brock <sourceforge.br...@dse.nl>:

> Philipp Klaus Krause schreef op 2021-06-29 12:03:
> > Am 29.06.21 um 10:22 schrieb Павел Бельтюков:
> >> It would be great if there was some macro definition indicating
> >> calling
> >> convention at compile time.
> >> In such case we could do something like that:
> >>
> >>     void some_func()
> >>     {
> >>         __asm
> >>     #ifdef __SDCC_STM8_CALL_LEGACY
> >>     /*Legacy code*/
> >>     #else /* __SDCC_STM8_CALL_LEGACY  */
> >>     /*Code for current calling convention*/
> >>     #endif /* __SDCC_STM8_CALL_LEGACY  */
> >>         __endasm;
> >>      }
> >>
> >>
> >> Best regards,
> >> Paul Beltyukov
> >
> > Do we need a separate macro? There will be a bump in the minor version
> > number anyway, so you could test for that (or test for the revision, as
> > I do to deal with old char getchar(void) vs current int getchar(void)).
> >
> > Philipp
>
> If besides a function modifier there will also be a command line option
> to globally select the old behavior, then I suggest to also create a
> macro. Otherwise I see no need for it.
>
> Maarten
>
>
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to