Release 0.94.9: C-style "==" operator is now recognized (but gives a warning).

git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@29 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
marcobaye 2014-05-06 22:16:41 +00:00
parent e1516161ce
commit f9e55a0d13
5 changed files with 21 additions and 5 deletions

View File

@ -12,6 +12,14 @@ platform used. There should be another help file in this archive
outlining the platform specific changes.
----------------------------------------------------------------------
Section: New in release 0.94.9
----------------------------------------------------------------------
C-style equality checking ("==" operator) is now recognized (but gives
a warning). Thanks to groepaz for the suggestion.
----------------------------------------------------------------------
Section: New in release 0.94.8
----------------------------------------------------------------------

View File

@ -52,6 +52,9 @@ Bug in ACME, code follows
A situation has been encountered implying there is a bug in ACME.
See the last section in this file.
C-style "==" comparison detected
To check for equality, use a single '=' character instead.
Implicit label definition not in leftmost column.
An implicit label definition has blanks before the label name.
Imagine this source code:

View File

@ -15,9 +15,9 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define RELEASE "0.94.8" // update before release (FIXME)
#define RELEASE "0.94.9" // update before release (FIXME)
#define CODENAME "Zarquon" // update before release
#define CHANGE_DATE "11 Mar" // update before release
#define CHANGE_DATE "7 May" // update before release
#define CHANGE_YEAR "2014" // update before release
//#define HOME_PAGE "http://home.pages.de/~mac_bacon/smorbrod/acme/" // FIXME
#define HOME_PAGE "http://sourceforge.net/p/acme-crossass/" // FIXME

View File

@ -763,7 +763,12 @@ static void expect_dyadic_operator(void)
case '=': // is equal
operator = &ops_equals;
goto get_byte_and_push_dyadic;
// if it's "==", accept but warn
if (GetByte() == '=') {
Throw_warning("C-style \"==\" comparison detected");
goto get_byte_and_push_dyadic;
}
goto push_dyadic;
case ')': // closing parenthesis
operator = &ops_closing;

View File

@ -136,7 +136,7 @@ SCS jump_lind[] = { 0, 0, 0, 0xdc00, 0xdc00, 0,
// error message strings
static const char exception_illegal_combination[] = "Illegal combination of command and addressing mode.";
static const char exception_highbyte_zero[]= "Using oversized addressing mode.";
static const char exception_highbyte_zero[] = "Using oversized addressing mode.";
// Variables
@ -146,7 +146,7 @@ static struct dynabuf *mnemo_dyna_buf; // dynamic buffer for mnemonics
static struct node_t *mnemo_6502_tree = NULL; // holds 6502 mnemonics
static struct node_t *mnemo_6510_tree = NULL; // holds 6510 extensions
static struct node_t *mnemo_65c02_tree = NULL; // holds 65c02 extensions
//static node_t *mnemo_Rockwell65c02_tree = NULL; // Rockwell
//static struct node_t *mnemo_Rockwell65c02_tree = NULL; // Rockwell
static struct node_t *mnemo_WDC65c02_tree = NULL; // WDC's "stp"/"wai"
static struct node_t *mnemo_65816_tree = NULL; // holds 65816 extensions