Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when compiled, the maximum number of function keys are 32 #458

Open
MiraiHattori opened this issue Dec 30, 2020 · 0 comments
Open

when compiled, the maximum number of function keys are 32 #458

MiraiHattori opened this issue Dec 30, 2020 · 0 comments

Comments

@MiraiHattori
Copy link

As I said in the title, when a euslisp code is compiled, I've noticed the maximum number of function keys are 32.
Is it possible to increase this number or print an error because someone else may experience this problem?

define-func.l

#!/usr/bin/env roseus

;; define-func.l
(defun arg-num-test
  (&key
     (a0 (print "0"))
     (a1 (print "1"))
     (a2 (print "2"))
     (a3 (print "3"))
     (a4 (print "4"))
     (a5 (print "5"))
     (a6 (print "6"))
     (a7 (print "7"))
     (a8 (print "8"))
     (a9 (print "9"))
     (a10 (print "10"))
     (a11 (print "11"))
     (a12 (print "12"))
     (a13 (print "13"))
     (a14 (print "14"))
     (a15 (print "15"))
     (a16 (print "16"))
     (a17 (print "17"))
     (a18 (print "18"))
     (a19 (print "19"))
     (a20 (print "20"))
     (a21 (print "21"))
     (a22 (print "22"))
     (a23 (print "23"))
     (a24 (print "24"))
     (a25 (print "25"))
     (a26 (print "26"))
     (a27 (print "27"))
     (a28 (print "28"))
     (a29 (print "29"))
     (a30 (print "30"))
     (a31 (print "31"))
     (a32 (print "32"))
     (a33 (print "33"))
     (a34 (print "34"))
     (a35 (print "35"))
     (a36 (print "36"))
     (a37 (print "37"))
     (a38 (print "38"))
     (a39 (print "39"))
    )
  0
  )

call-func.l

;; call-func.l
#!/usr/bin/env roseus    
(comp::compile-file "define-func.l")    
(load "define-func.so")    
(arg-num-test :a0 nil :a1 nil :a2 nil :a3 nil :a4 nil :a5 nil :a6 nil :a7 nil :a8 nil :a9 nil :a10 nil :a11 nil :a12 nil :a13 nil :a14 nil :a15 nil :a16 nil :a17 nil :a18 nil :a19 nil :a20 nil :a21 nil :a22 nil :a23 nil :a24 nil :a25 nil :a26 nil :a27 nil :a28 nil :a29 nil :a30 nil :a31 nil :a32 nil :a33 nil :a34 nil :a35 nil :a36 nil :a37 nil :a38 nil :a39 nil)

output of $ eus call-func.l

configuring by "/opt/ros/kinetic/share/euslisp/jskeus/eus//lib/eusrt.l"
;; readmacro ;; object ;; packsym ;; common ;; constants ;; stream ;; string ;; loader ;; pprint ;; process ;; hashtab ;; array ;; mathtran ;; eusdebug ;; eusforeign ;; extnum ;; coordinates ;; tty ;; history ;;
 toplevel ;; trans ;; comp ;; builtins ;; par ;; helpsub ;; eushelp ;; fstringdouble 
EusLisp 9.27() for Linux64 created on ip-172-30-1-103(Sat Oct 17 21:08:41 UTC 2020)
compiling file: ./define-func.l
gcc -g -c -Dx86_64 -DLinux -Wimplicit -falign-functions=8 -DGCC3  -DGCC -fsigned-char  -DTHREADED -DPTHREAD -fpic  -I/opt/ros/kinetic/share/euslisp/jskeus/eus/include -O2 ./define-func.c; ld -shared -build-id -o
 ./define-func.so ./define-func.o./define-func.c: In function ‘F59arg_num_test’:
./define-func.c:219:12: warning: left shift count >= width of type [-Wshift-count-overflow]
  if (n & (1<<32)) goto KEY93;
            ^
./define-func.c:225:12: warning: left shift count >= width of type [-Wshift-count-overflow]
  if (n & (1<<33)) goto KEY94;
            ^
./define-func.c:231:12: warning: left shift count >= width of type [-Wshift-count-overflow]
  if (n & (1<<34)) goto KEY95;
            ^
./define-func.c:237:12: warning: left shift count >= width of type [-Wshift-count-overflow]
  if (n & (1<<35)) goto KEY96;
            ^
./define-func.c:243:12: warning: left shift count >= width of type [-Wshift-count-overflow]
  if (n & (1<<36)) goto KEY97;
            ^
./define-func.c:249:12: warning: left shift count >= width of type [-Wshift-count-overflow]
  if (n & (1<<37)) goto KEY98;
            ^
./define-func.c:255:12: warning: left shift count >= width of type [-Wshift-count-overflow]
  if (n & (1<<38)) goto KEY99;
            ^
./define-func.c:261:12: warning: left shift count >= width of type [-Wshift-count-overflow]
  if (n & (1<<39)) goto KEY100;
            ^

"32"
"33"
"34"
"35"
"36"
"37"
"38"
"39"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant