How To Disable A Specific Warning?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When moving from MSVC to GCC 4.3.2 (same problem with, say, 3.4.4), I encountered a problem in which GCC signals a warning in the following instance:

------------foo.c--------------------
typedef struct tagFOO
{
    int a;
} FOO;

void FCN (FOO* b)
{
}

etc.
------------foo.pro------------------
void FCN (struct tagFOO *b);

etc.
------------fop.c--------------------
#include "foo.pro"

// There are no references in this file to function <FCN>.

etc.
-------------------------------------

The file <foo.pro> is generated automatically from <foo.c>.

GCC signals the warning

In file included from fop.c:1:
foo.pro:1: warning: "struct tagFOO" declared inside parameter list
foo.pro:1: warning: its scope is only this definition or declaration, which is probably not what you want

I'm trying to keep the dependency tree down to a minimum, so having to declare tagFOO within <fop.c> is counter to that goal.

Is there some way to disable just this warning?

--
_______________________________________________________________
Bob Smith - bsmith@xxxxxxxxxxxxxxx - http://www.sudleyplace.com


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux