| ??? 07/27/06 10:41 Modified: 07/27/06 10:41 Read: times |
#121155 - A slight mistake Responding to: ???'s previous message |
Peter,
Your typedefs are outside the conditional sections for C51/AVR. Presumably, this just happens to work in this case - but, in general, they should be within your compiler-specific sections. It is also good to specifically test for supported compilers, and have any other give an error; eg #if defined __C51__ // Keil C51 specific stuff typedef unsigned char u8; typedef signed char s8; typedef unsigned short u16; typedef signed short s16; typedef unsigned long u32; typedef signed long s32; #elif defined __GNUC__ // GCC-AVR specific stuff typedef unsigned char u8; typedef signed char s8; typedef unsigned short u16; typedef signed short s16; typedef unsigned long u32; typedef signed long s32; #else // Neither GCC nor C51 - force the user to take specifc action! #error Unsupported Compiler! #endif |
| Topic | Author | Date |
| How long we see 8051 | 01/01/70 00:00 | |
| unofficial history of 8051 | 01/01/70 00:00 | |
| History, or prediction? | 01/01/70 00:00 | |
| It seems to gain, not lose | 01/01/70 00:00 | |
| Does it matter? | 01/01/70 00:00 | |
| Double negative? | 01/01/70 00:00 | |
| to C or not to C | 01/01/70 00:00 | |
| Defintely 'C'! | 01/01/70 00:00 | |
| yeah, let's flame! | 01/01/70 00:00 | |
| Defintely 'C'! | 01/01/70 00:00 | |
| arguments | 01/01/70 00:00 | |
| An example for 8051/AVR | 01/01/70 00:00 | |
| contra-example for 8051/AVR | 01/01/70 00:00 | |
| A slight mistake | 01/01/70 00:00 | |
| stdint.h | 01/01/70 00:00 | |
| That's your trouble, then! | 01/01/70 00:00 | |
| Compiler independant | 01/01/70 00:00 | |
| C is not better | 01/01/70 00:00 | |
| bringing 2 togethert | 01/01/70 00:00 | |
| Opening pandora's box | 01/01/70 00:00 | |
| Learning C | 01/01/70 00:00 | |
for a beginner ... | 01/01/70 00:00 | |
| are You sure? | 01/01/70 00:00 | |
| Portability and scars | 01/01/70 00:00 | |
| I'm an ASM Guru but | 01/01/70 00:00 | |
| why discuss the rare exception tha same apply | 01/01/70 00:00 |



