[Openmcl-devel] EXTERNAL-CALL type checking with constants
Alexander Repenning
ralex at cs.colorado.edu
Sat Feb 20 11:22:03 PST 2010
Some parameter types of external functions appear not be checked (at all or the same) when invoked using parameters that are constant, e.g.
OpenGL function definition of GLPUSHNAME. Notice <GL>UINT which is an unsigned int
(DEFUN GLPUSHNAME (GLUINT-0)
(CCL:EXTERNAL-CALL "glPushName" :<GL>UINT GLUINT-0 :VOID))
calling like this:
(let ((View (view-named *w* "world"))) ;;; need to have an glcontext to avoid crashing
(with-glcontext View
(glPushName (- (random 2) 2))))
can result in an error, e.g., Error: value -1 is not of the expected type (UNSIGNED-BYTE 32). Good!
but
(let ((View (view-named *w* "world")))
(with-glcontext View
(glPushName -1)))
will not create an error or warning at all. I assume this could be some compiler inlining "optimization"? What could be done?
thanks, Alex
Prof. Alexander Repenning
University of Colorado
Computer Science Department
Boulder, CO 80309-430
vCard: http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20100220/87e8cd59/attachment.htm>
More information about the Openmcl-devel
mailing list