codice HTML:
#define CONVERT_CARDS( c, n ) \
MACRO_START \
INT32 nCards[ n ]; \
\
for ( INT32 xyz = 0; xyz < n; xyz++ ) { \
nCards[ xyz ] = nDeck[ cards[ xyz ] ]; \
} \
\
fast_sort( nCards, n ); \
MACRO_END
// [ ... ]
inline VOID check_3_cards(
const INT32* cards, handDetail* details, const INT32* points )
{
CONVERT_CARDS( cards, 3 );
if ( nCards[ 1 ] != nCards[ 2 ] && nCards[ 1 ] != nCards[ 0 ] ) {
// [ ... ]
Scusate ma dove sbaglio?
EDIT:
il problema è risolto se tolgo MACRO_START, e MACRO_END, che equivalgono a:
#define MACRO_START do {
#define MACRO_END } while( 0 )
qualcuno mi può spiegare il perchè? (compilatore gcc)
Immagino perchè lo riconosca dentro "un blocco", solo che gcc non dovrebbe togliere in automatico il "do while" ?