1.1.1 clang

Xcas devel: interface utilisateur/user interface

Modérateur : xcasadmin

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

1.1.1 clang

Message par frederic han » sam. juil. 05, 2014 7:24 am

J'ai fait un essai de la 1.1.1 du 4/7 avec clang

il bloque sur:

Code : Tout sélectionner

index.cc:365:12: error: calling a private constructor of class
      'std::__1::__wrap_iter<short *>'
    return index_t::iterator((giac::deg_t *) direct);
 
...

Code : Tout sélectionner

index.cc:411:31: error: calling a private constructor of class
      'std::__1::__wrap_iter<short *>'
      riptr = new ref_index_t(index_t::iterator((giac::deg_t *)direct),i...

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: 1.1.1 clang

Message par parisse » sam. juil. 05, 2014 6:51 pm

il faudrait essayer en desactivant les optimisations a cet endroit, par exemple en enlevant GIAC_VECTOR des define de compilation.

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: 1.1.1 clang

Message par frederic han » dim. juil. 06, 2014 6:18 am

Voici les modifs que j'ai du faire pour clang sous freebsd>10, il faut probablement les memes sous macos
10.9 car j'avais des messages d'erreurs similaires:

Ex: Graph3d.cc:585:17: error: variable length array of non-POD element type

Code : Tout sélectionner

--- Graph3d.cc.orig	2014-07-05 10:30:42.000000000 +0200
+++ Graph3d.cc	2014-07-05 10:33:15.000000000 +0200
@@ -582,7 +582,7 @@
   // surface without grid evaluation, should not happen!
   void glsurface(const vecteur & point,const gen & uv,double umin,double umax,double vmin,double vmax,int nu,int nv,int draw_mode,GIAC_CONTEXT){
     double u=umin,v=vmin,deltau=(umax-umin)/nu,deltav=(vmax-vmin)/nv;
-    gen prevline[nv+1];//,line[nv+1];
+    gen *prevline=new gen[nv+1];//,line[nv+1];
     vecteur curuv(2);
     gen old,current;
     curuv[0]=u;
@@ -615,6 +615,7 @@
 	cerr << endl;
       */
     }
+    delete [] prevline;
   }

Code : Tout sélectionner

--- gausspol.h.orig	2014-07-05 10:10:33.000000000 +0200
+++ gausspol.h	2014-07-05 10:08:26.000000000 +0200
@@ -439,7 +439,7 @@
     U u,prevu=0;
     int k;
     int count=0;
-#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__)) && !defined(GIAC_VECTOR))
+#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__)) && !defined(GIAC_VECTOR)) || defined(__clang__)
     if (0){ count=0; }
 #else
     if (pdim<=POLY_VARS){

Code : Tout sélectionner

--- index.cc.orig	2014-07-05 09:21:27.000000000 +0200
+++ index.cc	2014-07-05 10:19:19.000000000 +0200
@@ -346,7 +346,7 @@
     return true;
   }
 
-#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__)) && !defined(GIAC_VECTOR))
+#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__)) && !defined(GIAC_VECTOR)) || defined(__clang__)
   bool operator == (const index_m & i1, const index_m & i2){
     if (i1.riptr==i2.riptr)
       return true;

Code : Tout sélectionner

--- index.h.orig	2014-07-05 10:19:58.000000000 +0200
+++ index.h	2014-07-05 10:06:17.000000000 +0200
@@ -242,7 +242,7 @@
   // capacity of deg_t by direct addressing
   const int POLY_VARS=POLY_VARS_DIRECT+POLY_VARS_OTHER-1;
 
-#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__)) && !defined(GIAC_VECTOR))
+#if defined(GIAC_NO_OPTIMIZATIONS) || ((defined(VISUALC) || defined(__APPLE__)) && !defined(GIAC_VECTOR)) || defined(__clang__)
   class index_m {
   public:
     ref_index_t * riptr;

Répondre