"Medland," == Medland, Bill Bill.Medland@accpac.com writes:
Medland,> I am not very comfortable with this one but strange as it may Medland,> seem it solves the problem. I'd love to know why. Medland,> <<diff13.txt>> Bill Medland (medbi01@accpac.com) Prevents Medland,> excessive clipping in SysListView32.
Medland,> Medland,>-static inline int perfect_graphics(void) Medland,>+static int perfect_graphics(void) Medland,> { Medland,> static int perfect = -1; Medland,> if (perfect == -1) Medland,>
Some C-Expert is requested here, but I suspect that in the old function the variable "perfect" was created in every instantiation of the "perfect_graphics" inlined function. Could you perhaps try to declare the "perfect" outside the inlined function, like
static int perfect = -1; static inline int perfect_graphics(void)
Bye
Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de wrote in article 15199.54377.7430.982534@hertz.ikp.physik.tu-darmstadt.de...
"Medland," == Medland, Bill Bill.Medland@accpac.com writes:
Medland,> I am not very comfortable with this one but strange as it
may
Medland,> seem it solves the problem. I'd love to know why. Medland,> <<diff13.txt>> Bill Medland (medbi01@accpac.com) Prevents Medland,> excessive clipping in SysListView32. Medland,> Medland,>-static inline int perfect_graphics(void) Medland,>+static int perfect_graphics(void) Medland,> { Medland,> static int perfect = -1; Medland,> if (perfect == -1) Medland,>
Some C-Expert is requested here, but I suspect that in the old function
the
variable "perfect" was created in every instantiation of the "perfect_graphics" inlined function. Could you perhaps try to declare the "perfect" outside the inlined function, like
static int perfect = -1; static inline int perfect_graphics(void)
Bye
Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
It's not my function so I don't particularly care what happens; all that I know is that when the function was modified on 19 June it started causing problems with the listview control when the texts were too large to fit. Note that the static int perfect was inside the function before that date. However to be honest since the function grew so significantly and takes no argument I don't see why it is inline anyway.
Bill
Uwe Bonnes wrote:
"Medland," == Medland, Bill Bill.Medland@accpac.com writes:
Medland,> I am not very comfortable with this one but strange as it may Medland,> seem it solves the problem. I'd love to know why. Medland,> <<diff13.txt>> Bill Medland (medbi01@accpac.com) Prevents Medland,> excessive clipping in SysListView32. Medland,> Medland,>-static inline int perfect_graphics(void) Medland,>+static int perfect_graphics(void) Medland,> { Medland,> static int perfect = -1; Medland,> if (perfect == -1) Medland,>
Some C-Expert is requested here, but I suspect that in the old function the variable "perfect" was created in every instantiation of the "perfect_graphics" inlined function. Could you perhaps try to declare the "perfect" outside the inlined function, like
static int perfect = -1; static inline int perfect_graphics(void)
No, 'inline' must not change the semantics of the routine in any way, including static variables.
If the app behaves differently when 'perfect_graphics' is inlined, this is a compiler bug. Which compiler version are you using?
Bye, Ulrich
Ulrich Weigand weigand@immd1.informatik.uni-erlangen.de wrote in article 200107262124.XAA25786@faui11.informatik.uni-erlangen.de...
Uwe Bonnes wrote:
> "Medland," == Medland, Bill Bill.Medland@accpac.com writes:
Medland,> I am not very comfortable with this one but strange as it
may
Medland,> seem it solves the problem. I'd love to know why. Medland,> <<diff13.txt>> Bill Medland (medbi01@accpac.com) Prevents Medland,> excessive clipping in SysListView32. Medland,> Medland,>-static inline int perfect_graphics(void) Medland,>+static int perfect_graphics(void) Medland,> { Medland,> static int perfect = -1; Medland,> if (perfect == -1) Medland,>
Some C-Expert is requested here, but I suspect that in the old function
the
variable "perfect" was created in every instantiation of the "perfect_graphics" inlined function. Could you perhaps try to declare
the
"perfect" outside the inlined function, like
static int perfect = -1; static inline int perfect_graphics(void)
No, 'inline' must not change the semantics of the routine in any way, including static variables.
If the app behaves differently when 'perfect_graphics' is inlined, this is a compiler bug. Which compiler version are you using?
Excuse my ignorance. rpm says it is 2.96-81. How do I ask gcc what version IT thinks it is? (Running on RH7.1; how do I get the kernel version? rpm says 2.4.2-2)
Bill
Bill Medland wrote:
Excuse my ignorance. rpm says it is 2.96-81. How do I ask gcc what version IT thinks it is? (Running on RH7.1; how do I get the kernel version? rpm says 2.4.2-2)
Bill
type at prompt
uname -a
Igor
On Fri, 27 Jul 2001, Igor wrote:
Bill Medland wrote:
Excuse my ignorance. rpm says it is 2.96-81. How do I ask gcc what version IT thinks it is?
Script started on Fri Jul 27 11:44:32 2001 [whit@giftie whit]$ gcc -v Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/specs gcc version 2.95.3 20010315 (release) [whit@giftie whit]$ exit
Script done on Fri Jul 27 11:44:39 2001
(Running on RH7.1; how do I get the kernel version? rpm says 2.4.2-2)
Bill
type at prompt
uname -a
Igor
________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/tagj.
On Fri, 27 Jul 2001, Bill Medland wrote: [...]
Excuse my ignorance. rpm says it is 2.96-81. How do I ask gcc what version IT thinks it is?
gcc -v gcc -dumpspecs
(Running on RH7.1; how do I get the kernel version? rpm says 2.4.2-2)
cat /proc/version
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Stolen from an Internet user: "f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng !"
Bill Medland wrote:
Ulrich Weigand weigand@immd1.informatik.uni-erlangen.de wrote in article 200107262124.XAA25786@faui11.informatik.uni-erlangen.de...
No, 'inline' must not change the semantics of the routine in any way, including static variables.
If the app behaves differently when 'perfect_graphics' is inlined, this is a compiler bug. Which compiler version are you using?
Excuse my ignorance. rpm says it is 2.96-81. How do I ask gcc what version IT thinks it is? (Running on RH7.1; how do I get the kernel version? rpm says 2.4.2-2)
gcc 2.96 is the version RedHat is currently using; it is not an 'official' version supported by the gcc folks ...
However, RedHat has been fixing quite a bunch of bugs in their compiler; it might be worthwhile to check whether this inlining bug is fixed in the most recent RedHat update. (Check the RPM sublevel to find out whether you have the most recent update, that's the -81 in your case. AFAIK, bugfix updates can be downloaded from the RedHat FTP site ...)
Bye, Ulrich
Ulrich Weigand weigand@immd1.informatik.uni-erlangen.de wrote in article 200107301823.UAA01150@faui11.informatik.uni-erlangen.de...
Bill Medland wrote:
Ulrich Weigand weigand@immd1.informatik.uni-erlangen.de wrote in
article
200107262124.XAA25786@faui11.informatik.uni-erlangen.de...
No, 'inline' must not change the semantics of the routine in any way, including static variables.
If the app behaves differently when 'perfect_graphics' is inlined,
this
is a compiler bug. Which compiler version are you using?
Excuse my ignorance. rpm says it is 2.96-81. How do I ask gcc what version IT thinks it is? (Running on RH7.1; how do I get the kernel version? rpm says 2.4.2-2)
gcc 2.96 is the version RedHat is currently using; it is not an 'official' version supported by the gcc folks ...
However, RedHat has been fixing quite a bunch of bugs in their compiler; it might be worthwhile to check whether this inlining bug is fixed in the most recent RedHat update. (Check the RPM sublevel to find out whether you have the most recent update, that's the -81 in your case. AFAIK, bugfix updates can be downloaded from the RedHat FTP site ...)
Bye, Ulrich
Thanks; I'll try that when I have a moment.
Bill
Bill Medland medbi01@accpac.com wrote in article 01c1194f$025f5f00$6f0c10ac@medbi01...
Ulrich Weigand weigand@immd1.informatik.uni-erlangen.de wrote in
article
200107301823.UAA01150@faui11.informatik.uni-erlangen.de...
Bill Medland wrote:
Ulrich Weigand weigand@immd1.informatik.uni-erlangen.de wrote in
article
200107262124.XAA25786@faui11.informatik.uni-erlangen.de...
No, 'inline' must not change the semantics of the routine in any
way,
including static variables.
If the app behaves differently when 'perfect_graphics' is inlined,
this
is a compiler bug. Which compiler version are you using?
Excuse my ignorance. rpm says it is 2.96-81. How do I ask gcc what version IT thinks it is? (Running on RH7.1; how do I get the kernel version? rpm says 2.4.2-2)
gcc 2.96 is the version RedHat is currently using; it is not an 'official' version supported by the gcc folks ...
However, RedHat has been fixing quite a bunch of bugs in their compiler; it might be worthwhile to check whether this inlining bug is fixed in the most recent RedHat update. (Check the RPM sublevel to find out whether you have the most recent update, that's the -81 in your case. AFAIK, bugfix updates can be downloaded from the RedHat FTP site ...)
Bye, Ulrich
Thanks; I'll try that when I have a moment.
Well, I found a moment. The problem is still there with 2.96-85 which is what is currently available from RedHat. Maybe sometime I'll take a look at the difference in the generated assembler code, unless someone else is interested.
Bill