3 msgPointer allocation problem
2 msgmovq instruction not supported?

Turning warning off
\ rod.niner (31 Aug 2006)
. \ Andrew Haley (31 Aug 2006)
. \ Kaz Kylheku (31 Aug 2006)
. . \ Young, Michael (31 Aug 2006)
. \ Kaz Kylheku (31 Aug 2006)

2 msgGIMPLE SSA NOTATIONS
4 msghow to specify no vtable for a class ?
2 msgGCC ARM Linker Problem- Static function
3 msgSpecifiying alternatives to .data .bss in C sou...
8 msgProblem in Install gcc on Windows XP
2 msgBuilding GCC 3.0 on GCC 4.1.0
2 msggetopt function
1 msgFW: Lustig
1 msgHow to effectively debug Fortran 90 programs?
5 msgStatic set member.
2 msgldconfig and same name libs
3 msgDisabling x87 instructions in -O3 X86_64 sse en...
5 msgIs there a parameter called _DEBUG?
5 msgabout -00 option of gcc
1 msgIssue with armeb target. compiled binary can't ...
1 msgfstream problems
1 msgBuilding GCC 4.1.1 on Sparc/Solaris 8
Subject:RE: Turning warning off
Group:Gcc-help
From:Kaz Kylheku
Date:31 Aug 2006


> Michael Young wrote:
> Specifically, I'm looking for a way to turn off a specific
> warning inline, with the ability to restore it again -

That exists only in the form of the __attribute__ ((unused)) mechanism.

You can turn it off for an entire translation unit:

-Wno-unused

Actually you can get a little more fine-grained than that:

-Wno-unused-label
-Wno-unused-variable
-Wno-unusued-parameter
-Wno-unused-value

The -Wno-unused does all of them.

These options are not listed in the manual because ...

Each of these specific warning options also has a negative
for beginning `-Wno-' to turn off warnings; for example,
`-Wno-implicit'. This manual lists only one of the two
forms, whichever is not the default.

> analogous to the #pragma warning directive supported in MS
> VC++ (see
> http://msdn.microsoft.com/library/default.asp?url=/library/en-
> us/vclang/html/_predir_warning.asp for details).

GCC stays away from using #pragma, because of its disadvantages. For
instance, because it's a preprocessor directive, a #pragma cannot be
constructed using macros. Thus to switch among #pragma's based on the
compiler identity, you have to repeat #ifdef everywhere.

#ifdef _MSVC
#pragma warning (disable: NNNN)
#endif
...

#ifdef MSVC
#pragma warning (enable: NNNN)
#endif

The use of the __attribute__ ((unused)) extension can be hidden behind
macros.


© 2004-2008 readlist.com