[lisaac-Bugs][311042] The same code compiles with -D but doesn't without -D..

lisaac-bugs at alioth.debian.org lisaac-bugs at alioth.debian.org
Fri Sep 4 16:26:50 UTC 2009


Bugs item #311042, was changed at 04/09/2008 12:29 by Julien Puydt
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413092&aid=311042&group_id=100200

Status: Pending
Priority: 3
Submitted By: Xavier Oswald  (xaviero-guest)
Assigned to: Benoit Sonntag (sonntag-guest)
Summary: The same code compiles with -D but doesn't without -D.. 
Target Milestone: None
Category: None


Initial Comment:
I have some code (the margin is too small to put it here) which gives :
./simulateur.c:2768: warning: dereferencing ‘void *’ pointer
./simulateur.c:2768: error: request for member ‘valeur__H2C’ in something not a structure or union
upon compilation (in fact, it's trying to do NULL->valeur__H2C...) without option, but compiles ok with -D.

I haven't been able to reproduce it on a small example, but I thought I could still report it : perhaps someone who knows the compiler better can have a good enough hint...

julien.puydt at laposte.net

----------------------------------------------------------------------

Comment By: Julien Puydt (jpuydt-guest)
Date: 04/09/2009 18:26

Message:
Uh... which new version of the compiler? Debian still has 1:0.13.1-2, and that's still what is made public on the alioth&loria websites.

It's hard to show the code : I'm doing financial simulations with quite personal informations ; but I dived into it to have a fresh look on the problem, and found something I hadn't seen last time : I have a FAST_ARRAY of some objects, and :
(1) I'm calling a same method fin_de_mois (end of month) on all the objects within ; it's in that loop that it doesn't compile [the very similar debut_de_mois (start of month) doesn't have the problem] ;
(2) but if I remove precisely one of the objects from that FAST_ARRAY, then the compilation works even without -D, so the problem must be in that objects' implementation of it.

And I can show the code for that object, since it has no touchy data :
Section Header
  + name := GRAPHEUR;

Section Inherit
  - parent:CHRONOLOGIQUE := CHRONOLOGIQUE;

Section SELF
  + compte: COMPTE;

  - definit_compte compte_:COMPTE <-
  (
    compte := compte_;
  );

Section Public
  - initialise compte_:COMPTE :SELF <-
  [
    +? { compte_ != NULL };
  ]
  ( +result:SELF;
    result := clone;
    result.definit_compte (compte_);
    result
  );

  - debut_de_mois <-
  (
    // rien
  );

  - fin_de_mois <-
  (
    compte.solde.to_string.print; // FIXME: TEXT_FILE_WRITE !?
    '\n'.print;
  );

  - debut_d_annee <-
  (
    // rien
  );

  - fin_d_annee <-
  (
    // rien
  );

where the CHRONOLOGIQUE abstract class is :
Section Header
  + name := CHRONOLOGIQUE;
  
Section Inherit
  + parent:OBJECT := OBJECT;

Section Public
  - debut_de_mois <- deferred;
  - fin_de_mois <- deferred;
  - debut_d_annee <- deferred;
  - fin_d_annee <- deferred;

I hope that helps...

----------------------------------------------------------------------

Comment By: Mildred Ki'Lya (mildred-guest)
Date: 04/09/2009 16:07

Message:
Could you test with the stable branch of the compiler?
And if it doesn't work, we *really* need some code to see what's wrong here

----------------------------------------------------------------------

Comment By: Nobody (None)
Date: 04/09/2008 21:41

Message:
I'm the initial reporter, and I still see it with debian unstable's lisaac version 1:0.13.1-2

----------------------------------------------------------------------

Comment By: Mildred Ki'Lya (mildred-guest)
Date: 04/09/2008 17:31

Message:
I think the Lisaac source code is needed for that. Perhaps you could post it on pastebin.com or somewhere else. Depends on what it is.

And perhaps, the bug disappeared with the new version of the compiler, who knows ?

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413092&aid=311042&group_id=100200



More information about the Lisaac-devel mailing list