Some issues with the new Beta compiler
Posted: 10 Dec 2009 05:06
I am testing out the new compiler and have run into several issues, some minor - some not.
1. Declaring pointers.
Most compilers allow the following:-
char *test;
but the new compiler seems to insist on:-
char * test;
or it will spit out an error saying that a const expression is needed. This doesn't always happen though.
2. Assembly addresses
In the previous version, I would do the following:-
mov #@_myvar, W1
to load the address of myvar into W1. Now it gives me an error and I am not sure what the new syntax is.
3. Strange warning for const pointer assignment
const char a[] = "abc";
void test(void) {
char *c = a;
}
This will create some odd warning.
There are several other strange warnings but I think there needs to be more work done to bring the compiler up to speed.
Daniel
1. Declaring pointers.
Most compilers allow the following:-
char *test;
but the new compiler seems to insist on:-
char * test;
or it will spit out an error saying that a const expression is needed. This doesn't always happen though.
2. Assembly addresses
In the previous version, I would do the following:-
mov #@_myvar, W1
to load the address of myvar into W1. Now it gives me an error and I am not sure what the new syntax is.
3. Strange warning for const pointer assignment
const char a[] = "abc";
void test(void) {
char *c = a;
}
This will create some odd warning.
There are several other strange warnings but I think there needs to be more work done to bring the compiler up to speed.
Daniel