Error: expected unqualified-id before numeric constant

Messages in english

Modérateur : xcasadmin

sagitter
Messages : 31
Inscription : sam. mai 14, 2016 6:19 pm
Localisation : Italy

Error: expected unqualified-id before numeric constant

Message par sagitter » sam. juil. 02, 2016 10:19 am

Hi,

this error does fail Giac (1.2.2-63) build on PPC64 architecture (Fedora, Linux):

Code : Tout sélectionner

first.h:157:84: error: expected unqualified-id before numeric constant
 #define define_unary_function_eval(name,ptr,name_s) const unary_function_eval name(0,ptr,name_s)
Please, take a look to full build log: http://ppc.koji.fedoraproject.org/kojif ... /build.log
mailto: sagitter 'at' fedoraproject 'dot' org
https://fedoraproject.org/wiki/User:Sagitter

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

Re: Error: expected unqualified-id before numeric constant

Message par parisse » sam. juil. 02, 2016 4:08 pm

Perhaps __vector is conflicting with something else. Does it compile if you replace __vector by another name, e.g. _pb_vector, in plot.cc line 2393 and 2394

Code : Tout sélectionner

  static define_unary_function_eval (__vector,(const gen_op_context &)&giac::_vector,_vector_s);
  define_unary_function_ptr5( at_vector ,alias_at_vector,&__vector,0,true);

sagitter
Messages : 31
Inscription : sam. mai 14, 2016 6:19 pm
Localisation : Italy

Re: Error: expected unqualified-id before numeric constant

Message par sagitter » dim. juil. 03, 2016 10:32 am

This patch looks fix the error:

Code : Tout sélectionner

--- src/plot.orig.cc	2016-06-21 14:49:07.000000000 +0200
+++ src/plot.cc	2016-07-03 12:06:04.354390594 +0200
@@ -2390,8 +2390,8 @@
     return _droite_segment(seg,_VECTOR__VECT,attributs,contextptr);
   }
   static const char _vector_s []="vector";
-  static define_unary_function_eval (__vector,(const gen_op_context &)&giac::_vector,_vector_s);
-  define_unary_function_ptr5( at_vector ,alias_at_vector,&__vector,0,true);
+  static define_unary_function_eval (_pb_vector,(const gen_op_context &)&giac::_vector,_vector_s);
+  define_unary_function_ptr5( at_vector ,alias_at_vector,&_pb_vector,0,true);
 
   gen _segment(const gen & args,GIAC_CONTEXT){
     if ( args.type==_STRNG && args.subtype==-1) return  args;
But comes out same bug reported in this topic.
Build log: http://arm.koji.fedoraproject.org/kojif ... /build.log
mailto: sagitter 'at' fedoraproject 'dot' org
https://fedoraproject.org/wiki/User:Sagitter

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

Re: Error: expected unqualified-id before numeric constant

Message par parisse » dim. juil. 03, 2016 11:16 am

I'm making the change in my own source.
For the failing tests, I believe it's the same reason as for ARM 64.

sagitter
Messages : 31
Inscription : sam. mai 14, 2016 6:19 pm
Localisation : Italy

Re: Error: expected unqualified-id before numeric constant

Message par sagitter » dim. juil. 03, 2016 1:26 pm

Still failed also by adding "-D__x86_64__ -DSMARTPTR64" flags.

http://ppc.koji.fedoraproject.org/kojif ... /build.log
I'm afraid I can't say more without access to a similar architecture.
I can consider PPC and ARM-64bit as architectures not supported.
Thanks.
mailto: sagitter 'at' fedoraproject 'dot' org
https://fedoraproject.org/wiki/User:Sagitter

Répondre