diff --git a/loopy/target/c/__init__.py b/loopy/target/c/__init__.py
index 01d26dd822e46973ad7ebb99f18ec4519e0b4585..8869ebecf3e08bf7921d4c9118dd1fda263adb32 100644
--- a/loopy/target/c/__init__.py
+++ b/loopy/target/c/__init__.py
@@ -80,6 +80,11 @@ class DTypeRegistryWrapper(object):
 def c99_preamble_generator(preamble_info):
     if any(dtype.is_integral() for dtype in preamble_info.seen_dtypes):
         yield("10_stdint", "#include <stdint.h>")
+    if any(dtype.numpy_dtype == np.dtype("bool")
+           for dtype in preamble_info.seen_dtypes):
+        yield("10_stdbool", "#include <stdbool.h>")
+    if any(dtype.is_complex() for dtype in preamble_info.seen_dtypes):
+        yield("10_complex", "#include <complex.h>")
 
 
 def _preamble_generator(preamble_info):
@@ -1079,9 +1084,11 @@ class CTarget(CFamilyTarget):
     @memoize_method
     def get_dtype_registry(self):
         from loopy.target.c.compyte.dtypes import (
-                DTypeRegistry, fill_registry_with_c99_stdint_types)
+                DTypeRegistry, fill_registry_with_c99_stdint_types,
+                fill_registry_with_c99_complex_types)
         result = DTypeRegistry()
         fill_registry_with_c99_stdint_types(result)
+        fill_registry_with_c99_complex_types(result)
         return DTypeRegistryWrapper(result)
 
 
diff --git a/loopy/target/c/compyte b/loopy/target/c/compyte
index 25ee8b48fd0c7d9f0bd987c6862cdb1884fb1372..7e48e1166a13cfbb7b60f909b071f088034ffda1 160000
--- a/loopy/target/c/compyte
+++ b/loopy/target/c/compyte
@@ -1 +1 @@
-Subproject commit 25ee8b48fd0c7d9f0bd987c6862cdb1884fb1372
+Subproject commit 7e48e1166a13cfbb7b60f909b071f088034ffda1