Hello,
I have some lines of assembly code (see below) which work and compiled just fine in MDK 4.10. Yesterday I installed MDk 4.14 and now the assembler comes with a warning. How can I solve this warning?
MSR cpsr_c, #I_Bit | Mode_IRQ ; return to IRQ mode and set I bit
warning: A1876W: Use of '|' as a synonym for the :OR: operator is deprecated. 404 0000008c MSR cpsr_c, #I_Bit | Mode_IRQ ; return to IRQ mode and set I bit
Kind regards, Sander
Do you understand what "deprecated" means?
It means that, although something is allowed, it is not recommended:
dictionary.cambridge.org/.../deprecate_1
In this context, it usually refers to an old feature that is still currently supported for backward compatibility, but is likely to be withdrawn in the (near) future...
The meaning message - and how to fix it - should now be clear:
Use of '|' as a synonym for the :OR: operator is deprecated
Maybe also see: dictionary.cambridge.org/.../synonym
That's one of those situations where the warning message says it all.
MSR cpsr_c, #I_Bit :OR: Mode_IRQ ; return to IRQ mode and set I bit
Sorry - that should, of course, say:
The meaning of the message - and how to fix it - should now be clear:
Thanks for the reply.
I think I missunderstood the warning.
Sander
Indeed it does - on the assumption that the reader has a clear understanding of the words "synonym" and "deprecated".
But is that a valid assumption - especially bearing in mind that many of the users of Keil tools are not native English speakers?
This has come up many times on this forum before, so: Do Keil need to review the "understandability" of their messages?
Perhaps the OP could provide feedback...
The C51 manual provides a description of each error code; eg, http://www.keil.com/support/man/docs/c51/c51_c100.htm
In uVision, you could just click on an error message, press F1, and it'd pop up the description.
Some are not actually very helpful, but it's a start.
The ARM compiler manuals (as far as I can see) don't even provide this!
:-(
The word "deprecated" is something a programmer gets exposed to quite a lot, even if it is seldom used in other situations.
"But is that a valid assumption - especially bearing in mind that many of the users of Keil tools are not native English speakers?"
It's not just native speakers who can have problems with such things.
Many moons ago, when I'd progressed from simple APPLESOFT BASIC test programs to proper tools, I remember seeing an error message being generated from the linker along the lines of:
Symbol XYZ multiply defined
I remember reading the word multiply as in 2 times 2. It took me a while to realise what it was trying to indicate.
Whoops, I should have said:
"It's not just NON native speakers who can have problems with such things."
Agreed - that is simply bad English!
I have commented on that one here before!