struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-3570.c
blobdf43df480b428ec6fbc706ac41d7712833f86af3
1 /* bug-3570.c
2 A comparison between pointers resulting in an invalid compile time error during AST proccessing.
3 */
5 #include <testfwk.h>
7 unsigned char *LevelMapGet(void) { return 0; }
9 typedef struct game_data {
10 unsigned char *current;
11 } MapData;
14 MapData mapData;
16 void
17 testBug(void) {
18 if ( mapData.current + 5 >= LevelMapGet() )
19 return;
21 if ( &mapData.current[5] >= LevelMapGet() ) // This comparison failed to compile
22 return;