chiark / gitweb /
src/c-types-{impl,parse}.tex: Support `_Atomic' types.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 29 May 2016 14:08:43 +0000 (15:08 +0100)
blah blah

src/c-types-impl.lisp
src/c-types-parse.lisp

index ce3aedfdb8e0b5469c1a741c6a9007480b255338..be679a0b4e77f4de3ed30c0ffe42d72cfef35b89 100644 (file)
@@ -82,6 +82,11 @@ (defun make-or-intern-c-type (new-type-class base-types &rest initargs)
         new-type-class
         initargs))
 
+;;;--------------------------------------------------------------------------
+;;; Qualifiers.
+
+(defmethod c-qualifier-keyword ((qualifier (eql :atomic))) "_Atomic")
+
 (defmethod qualify-c-type ((type qualifiable-c-type) qualifiers)
   (let ((initargs (instance-initargs type)))
     (remf initargs :qualifiers)
index 2c0e725731f2b12ff643cb8356868092512dc5b2..4244d3e5a3b23a5beafd6ea63ca4d6c0074a4525 100644 (file)
@@ -96,7 +96,8 @@ (defparameter *declspec-map*
                    ((type :taggedp t) :enum :struct :union)
                    (size :short :long (:long-long :name "long long"))
                    (sign :signed :unsigned)
-                   (qualifier :const :restrict :volatile)))
+                   (qualifier :const :restrict :volatile
+                              (:atomic :compat "_Atomic"))))
       (destructuring-bind (kind &key (taggedp nil))
          (let ((spec (car item)))
            (if (consp spec) spec (list spec)))