freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Compiler warning


From: David Turner
Subject: Re: [Devel] Compiler warning
Date: Tue, 08 Oct 2002 18:19:25 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910

Hello Steve,

Steve Dias wrote:
Hi,

I get the following compiler warning with the Algorithmics MIPS GNU
compiler, with '-Wall' and '-O3':

*       util/freetype2/src/sfnt/ttcmap0.c: In function
        `tt_face_build_cmaps':
*       In file included from ./util/freetype2/src/sfnt/sfnt.c:24:
*       util/freetype2/src/sfnt/ttcmap0.c:1702: warning: variable `p'
        might be clobbered by `longjmp' or `vfork'
*       util/freetype2/src/sfnt/ttcmap0.c:1735: warning: variable
        `pclazz' might be clobbered by `longjmp' or `vfork'

A google search showed that this may be a common warning from gcc given
the combination above, and I even found a reference to a similar warning
in earlier FreeType code, but in my relatively brief search, I couldn't
find a reasonable solution.

Given how warning-free the code is (Level 4 in DevStudio project!), I
figure maybe it's my tools or other configuration, or there's a
straightforward way to suppress this warning that's come up before.

Any ideas?

Well, I only experience this warning with GCC and optimization on, and
I strongly suspect this to be a compiler bug, as spotted by Werner. Fact
is that the variables are declared "volatile" and should never get
clobbered by the 'longjmp' in any way.

Seems that the GCC optimizer does funny things to the code generated. I
don't have any idea regarding its impact on the compiled code robustness
though... :-(

Regards,

- David Turner
- The FreeType Project  (www.freetype.org)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]