[m-rev.] diff: don't warn about pragma foreign_export for java

Peter Wang novalazy at gmail.com
Wed Apr 22 12:44:01 AEST 2009


Branches: main

compiler/add_pragma.m:
        Don't warn about `:- pragma foreign_export' declarations for Java, as
        it actually does work (for simple cases at least).

diff --git a/compiler/add_pragma.m b/compiler/add_pragma.m
index 412e9fb..aaeef6a 100644
--- a/compiler/add_pragma.m
+++ b/compiler/add_pragma.m
@@ -489,11 +489,9 @@ add_pragma_foreign_export_2(Arity, PredTable,
Origin, Lang, Name, PredId, Modes,
         ;
             % Emit a warning about using pragma foreign_export with
             % a foreign language that is not supported.
-            % XXX That's currently all of them except C, IL and Erlang.
+            % XXX That's currently C#.
             (
-                ( Lang = lang_java
-                ; Lang = lang_csharp
-                ),
+                Lang = lang_csharp,
                 Pieces = [words("Warning:"),
                     fixed("`:- pragma foreign_export' declarations"),
                     words("are not yet implemented for language"),
@@ -505,6 +503,7 @@ add_pragma_foreign_export_2(Arity, PredTable,
Origin, Lang, Name, PredId, Modes,
             ;
                 ( Lang = lang_c
                 ; Lang = lang_il
+                ; Lang = lang_java
                 ; Lang = lang_erlang
                 )
             ),
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list