December 10, 2003 DMC 8.39.1 bug: sizeof(char_constant) | ||||
---|---|---|---|---|
| ||||
BTW, I do have two more bug reports (internal error "go 235" and "cgcod 1741"), but for this I'd need a "preprocess only" functionality - I've tried "dmc -e" without success. Any hints ? Cheers, Markus /* Digital Mars 8.39.1 (2003-12-07) bug report * * sizeof('x') [char constant] is wrong under C * * How to repeat: * dmc bug02.c * bug02.exe * * Markus F.X.J. Oberhumer <markus@oberhumer.com> * * vi:ts=4:et */ #include <stdio.h> #include <assert.h> int main() { #if defined(__cplusplus) /* DMC is correct */ assert(sizeof('x') == 1); #else /* DMC bug - char constant must promote to int */ assert(sizeof('x') == sizeof(int)); #endif return 0; } |
December 10, 2003 Re: DMC 8.39.1 bug: sizeof(char_constant) | ||||
---|---|---|---|---|
| ||||
Posted in reply to mfx | "mfx" <markus@oberhumer.com> wrote in message news:br6mdp$2mvq$1@digitaldaemon.com... > BTW, I do have two more bug reports (internal error "go 235" and > "cgcod 1741"), but for this I'd need a "preprocess only" functionality - > I've tried "dmc -e" without success. Any hints ? Try spp.exe (the preprocessor). Or dmc -e -l (creates a .lst file). |
Copyright © 1999-2021 by the D Language Foundation