| Thread overview | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
November 27, 2008 D2 module(system) or module(safe)? | ||||
|---|---|---|---|---|
| ||||
D 2.021 changelog says: Added -safe switch and module(system) Identifier; syntax. But documentation[1] says: Safe Modules Safe modules are modules marked as safe by the (safe) appearing in the ModuleDeclaration. Safe modules are assumed to correctly implement a safe memory model, and are not checked by the compiler for such even if directed to. Trying an example using module (safe) I get: test.d(2): (safe) expected, not safe =/ module (system) works, so I guess the documentation is just outdated, as well as the compiler error message. Is the -safe flag supposed to work? How? [1] http://www.digitalmars.com/d/2.0/module.html -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- Cómo ser inconmensurablemente atractivo a la mujer del sexo opuesto. -- Libro de autoayuda de Hector Mesina. | ||||
November 27, 2008 Re: D2 module(system) or module(safe)? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Leandro Lucarella | On Thu, 27 Nov 2008 00:40:59 -0200, Leandro Lucarella wrote: > D 2.021 changelog says: > Added -safe switch and module(system) Identifier; syntax. > > But documentation[1] says: > > Safe Modules > > Safe modules are modules marked as safe by the (safe) appearing in the ModuleDeclaration. Safe modules are assumed to correctly implement a safe memory model, and are not checked by the compiler for such even if directed to. > > > Trying an example using module (safe) I get: test.d(2): (safe) expected, > not safe > > =/ > > module (system) works, so I guess the documentation is just outdated, as well as the compiler error message. > > Is the -safe flag supposed to work? How? > > > [1] http://www.digitalmars.com/d/2.0/module.html I assume you are right, for information on -safe see SafeD http://www.digitalmars.com/d/2.0/safed.html | |||
November 27, 2008 Re: D2 module(system) or module(safe)? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Leandro Lucarella | Leandro Lucarella wrote:
> module (system) works, so I guess the documentation is just outdated, as
> well as the compiler error message.
The doc is outdated. I'll fix it.
| |||
November 27, 2008 Re: D2 module(system) or module(safe)? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | Jesse Phillips, el 27 de noviembre a las 03:10 me escribiste: > > Is the -safe flag supposed to work? How? > > I assume you are right, for information on -safe see SafeD > > http://www.digitalmars.com/d/2.0/safed.html Yes, I read that document, but what I mean is that I've created a simple test: int* x = cast(int*) 9283; And it compiles without warnings or errors, with or without module (system). That doesn't looks safe in terms of memory to me ;-) -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- ACCIDENTE FATAL EN FLORES, MUEREN DOS PERSONAS Y UN BOLIVIANO -- Crónica TV | |||
November 27, 2008 Re: D2 module(system) or module(safe)? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright, el 27 de noviembre a las 00:19 me escribiste: > Leandro Lucarella wrote: > >module (system) works, so I guess the documentation is just outdated, as well as the compiler error message. > > The doc is outdated. I'll fix it. Should I fill a bug for the compiler error message? -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- FINALMENTE EL CABALLITO FABIAN VA A PASAR UNA BUENA NAVIDAD -- Crónica TV | |||
November 28, 2008 Re: D2 module(system) or module(safe)? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Leandro Lucarella | Leandro Lucarella wrote:
> Walter Bright, el 27 de noviembre a las 00:19 me escribiste:
>> Leandro Lucarella wrote:
>>> module (system) works, so I guess the documentation is just outdated, as
>>> well as the compiler error message.
>> The doc is outdated. I'll fix it.
>
> Should I fill a bug for the compiler error message?
>
I've already fixed it in the source code, so no need.
| |||
November 28, 2008 Re: D2 module(system) or module(safe)? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Leandro Lucarella | Leandro Lucarella wrote:
> And it compiles without warnings or errors, with or without module
> (system). That doesn't looks safe in terms of memory to me ;-)
Almost none of the checks are implemented, I just put the scaffolding in.
| |||
November 29, 2008 Re: D2 module(system) or module(safe)? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright, el 28 de noviembre a las 01:24 me escribiste: > Leandro Lucarella wrote: > >And it compiles without warnings or errors, with or without module > >(system). That doesn't looks safe in terms of memory to me ;-) > > Almost none of the checks are implemented, I just put the scaffolding in. Ok, good to know. Thank you. -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- Los sueños de los niños son especialmente importantes en su etapa de formación; si un niño no sueña es que será un pelotudo toda la vida. -- Ricardo Vaporeso | |||
November 29, 2008 Re: D2 module(system) or module(safe)? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright, el 28 de noviembre a las 01:23 me escribiste: > Leandro Lucarella wrote: > >Walter Bright, el 27 de noviembre a las 00:19 me escribiste: > >>Leandro Lucarella wrote: > >>>module (system) works, so I guess the documentation is just outdated, as well as the compiler error message. > >>The doc is outdated. I'll fix it. > >Should I fill a bug for the compiler error message? > > I've already fixed it in the source code, so no need. Thanks. -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- CAROZO CON FARINGITIS -- Crónica TV | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply