How to switch off those damm warnings about unknows pragma

From: Lionel Draghi (Lionel.nospam.Draghi_at_Ada-France.org)
Date: 12/12/04


Date: Sun, 12 Dec 2004 01:17:13 +0100

Martin Krischik a écrit :
...
> The thing I which for is a pragma to switch off the damm warning about not
> knowing pragma X.

I strongly agree. We do use handy GNAT specific pragma, and they cause
lots of spurious warning when compiling with ObjectAda. Filtering those
useless warning is a pain.

But even before adding a new pragma to the language, I asked to myself
why compiler vendors don't provide a compile option to ignore a
(precise) list of pragmas. I suppose it's a simple change in compilers code.

My hypothesis is that:
- vendors don't wan't to ease the life of customers using competitor's
product :-)
- most Ada programs are compiled for a single platform
- most of those compiled for more platform are with the same compiler
- most of those compiled with several compiler or for several platform
are when migrating from one to another, and don't actually target them
simultaneously
Let's now remove from the few remaining those using no specific pragma,
and those who don't read warnings :-), and there is almost no customer
in the world for seach a feature!

Anyway, we are at least two :-)

-- 
Lionel Draghi


Relevant Pages

  • Re: include file question
    ... Where did you read that #pragma once is obsolete? ... because it suggests that what you need is some kind of weird compiler hack to make your ... inside the header file to prevent multiple execution of the contents. ... documentation about Objective C, which is a language which is NOT the C++ language, has ...
    (microsoft.public.vc.mfc)
  • Re: Disable Compiler Waring
    ... I want to disable compiler warning C4482 (nonstandard extension used: ... enum 'enum' used in qualified name) ... #pragma warning ... I guess there are some compiler switch for it. ...
    (microsoft.public.vc.language)
  • Re: include file question
    ... First off I first read that you could keep the compiler ... But then I read that #pragma once is obsolete? ... The #include guards are portable since the beginning of time, ... Note that some headers use neither because they are ...
    (microsoft.public.vc.mfc)
  • Re: Ada checks suppression thanks to compilation options and Ada conformity
    ... One text book describes "pragma" as a "directive to the ... the compiler -- and indicate that compilers are allowed to ignore ... But this doens't apply to pragma Suppress, ... specify a compiler command-line option to suppress all checks, ...
    (comp.lang.ada)
  • OpenGL, Watcom C and C++ (Yet another... ;-)
    ... Before deciding to ask You for help, I have spent many many hours of searching on the web because I got so many errors and not having experience with a modern compiler like this one, it baffled me and gave me many headaches. ... colconverted function type has different #pragma from original function type ...
    (comp.graphics.api.opengl)