From 046619bb13c75e30907f0b8c1976ad49c8409465 Mon Sep 17 00:00:00 2001 From: qrczak Date: Wed, 24 Jan 2001 22:37:15 +0000 Subject: [PATCH] [project @ 2001-01-24 22:37:15 by qrczak] Add #warning support. --- ghc/docs/users_guide/utils.sgml | 1 + ghc/utils/hsc2hs/Main.hs | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ghc/docs/users_guide/utils.sgml b/ghc/docs/users_guide/utils.sgml index ef81e66..e3d45fe 100644 --- a/ghc/docs/users_guide/utils.sgml +++ b/ghc/docs/users_guide/utils.sgml @@ -311,6 +311,7 @@ tags: #else #endif #error message + #warning message Conditional compilation directives are passed unmodified to the C program, C file, and C header. Putting diff --git a/ghc/utils/hsc2hs/Main.hs b/ghc/utils/hsc2hs/Main.hs index 0c99565..8bf63e1 100644 --- a/ghc/utils/hsc2hs/Main.hs +++ b/ghc/utils/hsc2hs/Main.hs @@ -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) -- 1.7.10.4