From: michaelh Date: Fri, 1 Mar 2002 06:01:47 +0000 (+0000) Subject: * Added. X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=8c6497729564e3d8035c6314c05b75a2bae8663a;p=fw%2Fsdcc * Added. git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1958 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/support/regression/tests/bug-524209.c b/support/regression/tests/bug-524209.c new file mode 100644 index 00000000..fbb0cc45 --- /dev/null +++ b/support/regression/tests/bug-524209.c @@ -0,0 +1,33 @@ +/* Problem with casts and warnings. + */ +#include +#include + +typedef unsigned short UINT16; + +typedef struct _Class Class; + +typedef struct _Instance +{ + Class *pClass; +} Instance; + +typedef struct _StringBuffer +{ + Instance header; + UINT16 uLength; + UINT16 uMaxLength; +} StringBuffer; + + +void _scan(StringBuffer *pSB) +{ + UNUSED(*pSB); +} + +void checkCast(void *pIn) +{ + Instance *p = (Instance *)pIn; + _scan((StringBuffer *)p); +} +