[project @ 2001-01-24 22:37:15 by qrczak]
authorqrczak <unknown>
Wed, 24 Jan 2001 22:37:15 +0000 (22:37 +0000)
committerqrczak <unknown>
Wed, 24 Jan 2001 22:37:15 +0000 (22:37 +0000)
Add #warning support.

ghc/docs/users_guide/utils.sgml
ghc/utils/hsc2hs/Main.hs

index ef81e66..e3d45fe 100644 (file)
@@ -311,6 +311,7 @@ tags:
          <term><literal>#else</literal></term>
          <term><literal>#endif</literal></term>
          <term><literal>#error message</literal></term>
+         <term><literal>#warning message</literal></term>
          <listitem>
            <para>Conditional compilation directives are passed
             unmodified to the C program, C file, and C header. Putting
index 0c99565..8bf63e1 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.13 2001/01/15 07:33:02 qrczak Exp $
+-- $Id: Main.hs,v 1.14 2001/01/24 22:37:15 qrczak Exp $
 --
 -- (originally "GlueHsc.hs" by Marcin 'Qrczak' Kowalczyk)
 --
@@ -410,14 +410,15 @@ outTokenC (pos, key, arg) =
         _ -> ""
 
 conditional :: String -> Bool
-conditional "if"     = True
-conditional "ifdef"  = True
-conditional "ifndef" = True
-conditional "elif"   = True
-conditional "else"   = True
-conditional "endif"  = True
-conditional "error"  = True
-conditional _        = False
+conditional "if"      = True
+conditional "ifdef"   = True
+conditional "ifndef"  = True
+conditional "elif"    = True
+conditional "else"    = True
+conditional "endif"   = True
+conditional "error"   = True
+conditional "warning" = True
+conditional _         = False
 
 sourceFileName :: SourcePos -> String
 sourceFileName pos = fileName (sourceName pos)