Discussion:
[Sdcc-user] binary constants for STM8?
Georg Icking-Konert
2017-05-06 06:01:12 UTC
Permalink
again hello,

in the SDCC manual I read "SDCC supports the use of binary constants,
such as 0b01100010. This feature is only enabled when the compiler is
invoked using –std-sdccxx"

However, calling SDCC for stm8 with –std-sdccxx fails with "syntax
error" for the literal and a warning that "option '-s' no longer
supported". And caliing it with -–std-sdccxx gives the same syntax error
and a warning "unknown compiler option '--std-sdccxx' ignored".

Does this mean that binary literals are not yet implemented for STM8...?
If they are, please let me know how to use them.

Thanks in advance!

Regards, Georg
Maarten Brock
2017-05-06 08:17:42 UTC
Permalink
Post by Georg Icking-Konert
again hello,
in the SDCC manual I read "SDCC supports the use of binary constants,
such as 0b01100010. This feature is only enabled when the compiler is
invoked using –std-sdccxx"
However, calling SDCC for stm8 with –std-sdccxx fails with "syntax
error" for the literal and a warning that "option '-s' no longer
supported". And caliing it with -–std-sdccxx gives the same syntax error
and a warning "unknown compiler option '--std-sdccxx' ignored".
Does this mean that binary literals are not yet implemented for STM8...?
If they are, please let me know how to use them.
Thanks in advance!
Regards, Georg
Hello Georg,

You are kindly requested to replace the XX in --std-sdccXX with the year
of the C standard you wish to use. E.g. --std-sdcc99.

Further you seem to use different dashes before std.

Maarten

Continue reading on narkive:
Search results for '[Sdcc-user] binary constants for STM8?' (Questions and Answers)
5
replies
FTSE , IF's Student Investor Challenge?
started 2013-11-30 02:29:51 UTC
investing
Loading...