From 9c47d08e98953623ceac02c8422863e593deb40e Mon Sep 17 00:00:00 2001 From: Xavier ASUS Date: Wed, 23 Oct 2019 03:57:38 +0200 Subject: Implemented -c support for --gas STM8 code generator was generating some instructions in a "ld register, (#%d, register)" way, causing assembling errors on stm8-as. This is because stm8-as does not require the '#' character. A quick and dirty workaround has been implemented for this. Added new warning W_IGNORED_OPT_IN_ASM, which warns the user when both "--no-optsdcc-in-asm" and "--gas" are used (the first is ignored when the latter is active since GNU as does not accept the .optsdcc directive, as opposed to asxxx). --- src/SDCCerr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/SDCCerr.c') diff --git a/src/SDCCerr.c b/src/SDCCerr.c index 7ffd1d0..ef2a4f8 100644 --- a/src/SDCCerr.c +++ b/src/SDCCerr.c @@ -37,14 +37,14 @@ #define DEFAULT_ERROR_OUT stderr #endif -struct SDCCERRG _SDCCERRG; +struct SDCCERRG _SDCCERRG; extern char *filename; extern int lineno; extern int fatalError; -/* Currently the errIndex field must match the position of the - * entry in the array. It is only included in order to make +/* Currently the errIndex field must match the position of the + * entry in the array. It is only included in order to make * human error lookup easier. */ struct @@ -561,6 +561,8 @@ struct "invalid value for __z88dk_shortcall %s parameter: %x", 0}, { E_DUPLICATE_PARAMTER_NAME, ERROR_LEVEL_ERROR, "duplicate parameter name %s for function %s", 0}, + {W_IGNORED_OPT_IN_ASM, ERROR_LEVEL_WARNING, + "no optsdcc in assembly file configuration is ignored when using GNU as format output"} }; /* ------------------------------------------------------------------------------- -- cgit v1.2.3