From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7973f5b14b2860c9 X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: Compiling with Gnat Date: 1999/01/20 Message-ID: <784r4q$3t7@hobbes.crc.com>#1/1 X-Deja-AN: 434841932 References: X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: Coleman Research Corporation Newsgroups: comp.lang.ada Date: 1999-01-20T00:00:00+00:00 List-Id: Roger Hoyle wrote in message ... > >I'm compiling a large (0.7 M lines) application on a sparc using >GNATMAKE 3.10p > >The application was originally written on an AIX system so I was expecting >a few problems. The problem I have at the moment is that one of the >specification files won't compile - it gives the following error: > >use clause not allowed in predefined spec Frequently, the key to understanding what the compiler is saying is to carefully note every word of the message. In this case, I suspect the key word to be "predefined." What is the name of the file and the name of the unit in which you're placing this "use" clause? Does it have the name of one of the langage- or gnat- predefined units? > >The line in the code is : > >use Interfaces.C; > >and it makes no difference where I put it. Well, if it's not in a predefined spec it should work just fine. > >Is this constraint unique to Gnat, and is it permanent, or is there a switch >or equivalent which will allow the use of 'use'. > >Are there any workarounds better than putting appropriate references before >every variable. Would that work? > Personally, I avoid the use of the "use" clause like the plague, except in very small scopes, and then usually only for making infix operators visible. In Ada95, "use" clauses can be replaced by "use type" clauses for primitive operation visibility.