Dpaste vs dmd 2.063.2 errors

Raphaël Jakse raphael.jakse at gmail.com
Tue Jul 23 22:52:50 PDT 2013


Le 23/07/2013 14:26, JS a écrit :
> http://dpaste.dzfl.pl/27ca3fbd
>
> The code compiles fine on my computer. On DPaste there is all kinds of
> errors(when fixing one other errors pop up.
>
> I am compiling to 32-bit binary and that is the only real difference I
> can see, but surely it wouldn't result in such errors?
>
> The first error:
>
> /d547/f451.d(227): Error: unterminated character constant
> /d547/f451.d(227): Error: unterminated character constant
> /d547/f451.d(227): Error: found '41U' when expecting ')'
>
> makes no sense as far as I can tell unless my expand code generation
> templates are messed up.
>
> If someone wouldn't mind trying to compile the code and see if the
> errors are similar to dpaste I'd appreciate it. (I don't want to end up
> writing code that is very bad(even though this is just proof of concept
> code) and will end up breaking)

Trying to compile with gdc (gcc 4.6.4):
$ gdc dpaste.d
dpaste.d:179: Error: cannot implicitly convert expression (s.length - 
1LU) of type ulong to int

Changing int to auto at line 179:
$ gdc dpaste.d
if (s[max(0, j - d[0].length + 1)..s.length] == d[0]) { maxL = max(maxL, 
d[0].length); }
if (s[max(0, j - d[1].length + 1)..s.length] == d[1]) { maxL = max(maxL, 
d[1].length); }
if (s[max(0, j - d[2].length + 1)..s.length] == d[2]) { maxL = max(maxL, 
d[2].length); }

dpaste.d:182: Error: argument to mixin must be a string, not 
(ExpandVariadicIf!("??Cs[j]??s[max(0, j - %%L + 
1)..s.length]::","d","maxL = max(maxL, %%L);",string,string,string))


with dmd I have quite the same thing as monarch_dodra.


More information about the Digitalmars-d-learn mailing list