Re: compiler warning/bug in FvwmScript/script.y
On Thu, Nov 14, 2002 at 06:50:47PM -0500, Paul Smith wrote: %% Cameron Simpson [EMAIL PROTECTED] writes: | Sorry, I somehow missed that paragraph. I just can't operate info | :-/ cs You may want my man script, which presents info as one of the cs choices for manual pages. More to the point, it parses info files cs and turns them into a single flat text document, which of course cs you browse with your pager as with ordinary manual entries. Yes, please! That's exactly what I need! Info is quite accessible if you spend a few minutes learning the command set--there are only about 10 keys :). I have spent five years and can not get the hang of it. In particular, the s (search) and i (index lookup) are critically important to know. Once you know these you can do more with Info that you can do with either man pages or HTML. I really don't want to rant about the interface of info here. Let it suffice to say that I absolutely *hate* hierarchical documents. And info operates a bit like vi, a bit like lynx and a bit like emacs, but not quite. That totally confuses me. Bye Dominik ^_^ ^_^ -- Visit the official FVWM web page at URL:http://www.fvwm.org/. To unsubscribe from the list, send unsubscribe fvwm-workers in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
Re: compiler warning/bug in FvwmScript/script.y
On 10:00 15 Nov 2002, Dominik Vogt fvwm-workers@fvwm.org wrote: | On Thu, Nov 14, 2002 at 06:50:47PM -0500, Paul Smith wrote: | %% Cameron Simpson [EMAIL PROTECTED] writes: || Sorry, I somehow missed that paragraph. I just can't operate info || :-/ |cs You may want my man script, which presents info as one of the |cs choices for manual pages. More to the point, it parses info files |cs and turns them into a single flat text document, which of course |cs you browse with your pager as with ordinary manual entries. | | Yes, please! That's exactly what I need! Start here: http://www.zip.com.au/~cs/css/index.html#s-text-info2x and get the info2man.tar.gz file and also fetch: http://www.zip.com.au/~cs/scripts/man which is the script itself. You then add the info dirs to your $MANPATH and go. It may have a few dependencies on my environment which I'd be happy to iron out, so let me know if it gives you trouble. In particular it expects the envvar $OS to be linux on linux systems (well, actually groff-based systems). Hmm, I see there's now an nroff on my redhat box, so maybe you won't need the groff incantation at all. [...] | In particular, the s (search) and i (index lookup) are critically | important to know. Once you know these you can do more with Info that | you can do with either man pages or HTML. | | I really don't want to rant about the interface of info here. Let | it suffice to say that I absolutely *hate* hierarchical documents. | And info operates a bit like vi, a bit like lynx and a bit like | emacs, but not quite. That totally confuses me. I would second that hierachical remark - I also really hate limping through HOWTO web documents which are typically presented in pieces :-( And I generally want a big document in the pager my fingers know. Cheers, -- Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/ ... that, in a few years, all great physical constants will have been approximately estimated, and that the only occupation which will be left to men of science will be to carry these measurements to another place of decimals. - James Clerk Maxwell (1813-1879) Scientific Papers 2, 244, October 1871 -- Visit the official FVWM web page at URL:http://www.fvwm.org/. To unsubscribe from the list, send unsubscribe fvwm-workers in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
compiler warning/bug in FvwmScript/script.y
script.y had this code: foo *some_func() { if (...) { ... return something; } else { return NULL; *s = 0; } } This generates a compiler warning: script.y: In function `Depile': script.y:132: warning: control reaches end of non-void function Olivier, are you sure your gcc works correctly. You said you compile with -Wall, so you should have seen this warning/bug. I had a problem with gcc a while ago. When I compiled with -Wall -Werror -g I got no warnings at all, but with -Wall -Werror -g -O2 it worked fine. Are you sure you are not running into a similar problem? Can you post one of your compiler commands? Mine look like this: $ make CFLAGS=-Wall -Werror -g -O2 bindings.o source='bindings.c' object='bindings.o' libtool=no \ depfile='.deps/bindings.Po' tmpdepfile='.deps/bindings.TPo' \ depmode=gcc /bin/sh ../depcomp \ gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../libs -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include -DFVWM_MODULEDIR=\/usr/local/libexec/fvwm/2.5.5\ -DFVWM_DATADIR=\/usr/local/share/fvwm\ -DFVWM_CONFDIR=\/usr/local/etc\ -DFVWM_COLORSET_PRIVATE=1 -Wall -Werror -g -O2 -c `test -f 'bindings.c' || echo './'`bindings.c Bye Dominik ^_^ ^_^ -- Visit the official FVWM web page at URL:http://www.fvwm.org/. To unsubscribe from the list, send unsubscribe fvwm-workers in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
Re: compiler warning/bug in FvwmScript/script.y
On Thu, Nov 14, 2002 at 02:12:28PM +0100, Dominik Vogt wrote: script.y had this code: foo *some_func() { if (...) { ... return something; } else { return NULL; *s = 0; } } This generates a compiler warning: script.y: In function `Depile': script.y:132: warning: control reaches end of non-void function I am surprised by the warning description. A more natural warning will be something like code after end of function. I get the warning if, say, I remove return NULL. Note that the code you fix in script.c is there since an eternity I think. At least it is in 2.4. So, the question why you do not get such a warning before? Olivier, are you sure your gcc works correctly. You said you compile with -Wall, so you should have seen this warning/bug. I had a problem with gcc a while ago. When I compiled with -Wall -Werror -g I got no warnings at all, but with -Wall -Werror -g -O2 it worked fine. Are you sure you are not running into a similar problem? Can you post one of your compiler commands? I (want to) compile like this: $ make which gives: gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I/opt/X11R6-cvs/include \ -I/opt/X11R6-cvs/include/freetype2 -I/opt/X11R6-cvs/include \ -I/opt/X11R6-cvs/include -I/opt/X11R6-cvs/include -I/usr/local/include/fribidi \ -DFVWM_DATADIR=\/opt/fvwm/share/fvwm\ \ -g -O2 -Wall -Wno-implicit-int -c script.c ^^^ as I have a colored gcc I rarely miss a warning. But, as I say in a previous mail I do not know why -Wno-implicit-int has been added. So sometime I miss an implicit int declaration. I would like to remove this -Wno-implicit-int (and we may add an option, --developer, to configure, which adds -Werror if gcc is the compiler) Tim I think that you added -Wno-implicit-int. Why? Olivier -- Visit the official FVWM web page at URL:http://www.fvwm.org/. To unsubscribe from the list, send unsubscribe fvwm-workers in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
Re: compiler warning/bug in FvwmScript/script.y
%% Dominik Vogt fvwm-workers@fvwm.org writes: dv When I compiled with -Wall -Werror -g I got no warnings at all, dv but with -Wall -Werror -g -O2 it worked fine. Some kinds of warnings are not found unless you compile with optimization. Enabling the optimizer allows the compiler to look much more deeply at your code, and that can enable it to discover problems that can't be found by a simple one-pass compilation. The most common such warnings are for unused variable: without optimization on the compiler doesn't know enough about your code to realize that a variable is never used; only with optimization turned on will it keep enough state throughout the function to deliver that warning. Note that the level of optimization doesn't matter; even -O is good enough to find the extra warnings (but -O2 is the most common, and so best-tested, level of optimization in GCC). FYI. BTW, all of the above applies to GCC only; other compilers obviously may have different behavior. -- --- Paul D. Smith [EMAIL PROTECTED] HASMAT--HA Software Mthds Tools Please remain calm...I may be mad, but I am a professional. --Mad Scientist --- These are my opinions---Nortel Networks takes no responsibility for them. -- Visit the official FVWM web page at URL:http://www.fvwm.org/. To unsubscribe from the list, send unsubscribe fvwm-workers in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
Re: compiler warning/bug in FvwmScript/script.y
On Thu, Nov 14, 2002 at 10:15:50AM -0500, Paul Smith wrote: %% Dominik Vogt fvwm-workers@fvwm.org writes: dv When I compiled with -Wall -Werror -g I got no warnings at all, dv but with -Wall -Werror -g -O2 it worked fine. Some kinds of warnings are not found unless you compile with optimization. Enabling the optimizer allows the compiler to look much more deeply at your code, and that can enable it to discover problems that can't be found by a simple one-pass compilation. The most common such warnings are for unused variable: without optimization on the compiler doesn't know enough about your code to realize that a variable is never used; only with optimization turned on will it keep enough state throughout the function to deliver that warning. Heck! Why isn't that mentioned in the gcc info page?! So I can't have debuggable code and many important warnings at the same time? What really pisses me off during debugging sessions is when gcc optimizes local variables away. Note that the level of optimization doesn't matter; even -O is good enough to find the extra warnings (but -O2 is the most common, and so best-tested, level of optimization in GCC). Bye Dominik ^_^ ^_^ -- Visit the official FVWM web page at URL:http://www.fvwm.org/. To unsubscribe from the list, send unsubscribe fvwm-workers in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
Re: compiler warning/bug in FvwmScript/script.y
%% Dominik Vogt fvwm-workers@fvwm.org writes: dv Heck! Why isn't that mentioned in the gcc info page?! You mean like this: These warnings are possible only in optimizing compilation, because they require data flow information that is computed only when optimizing. If you don't specify `-O', you simply won't get these warnings. ? :) dv So I can't have debuggable code and many important warnings at the dv same time? Yep. I agree it's a drag--I've often felt that the -O0 flag or something should have a side-effect of doing the optimization warning checks, but then not actually optimizing the resulting code. Actually I'm not sure about many important warnings; I think the only two warnings which are enabled only for optimization are uninitialized variables (which is certainly important, I grant you) and nonvolatile automatic variables being changed by longjmp... which is rarely useful. I misspoke last time about the unused variables: those are warned even without -O. It's the uninitialized variables that aren't warned unless you enable -O. -- --- Paul D. Smith [EMAIL PROTECTED] HASMAT--HA Software Mthds Tools Please remain calm...I may be mad, but I am a professional. --Mad Scientist --- These are my opinions---Nortel Networks takes no responsibility for them. -- Visit the official FVWM web page at URL:http://www.fvwm.org/. To unsubscribe from the list, send unsubscribe fvwm-workers in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
Re: compiler warning/bug in FvwmScript/script.y
On Thu, Nov 14, 2002 at 11:04:59AM -0500, Paul Smith wrote: %% Dominik Vogt fvwm-workers@fvwm.org writes: dv Heck! Why isn't that mentioned in the gcc info page?! You mean like this: These warnings are possible only in optimizing compilation, because they require data flow information that is computed only when optimizing. If you don't specify `-O', you simply won't get these warnings. ? :) Sorry, I somehow missed that paragraph. I just can't operate info :-/ At least it should throw a warning that it does not generate these warnings ;-) dv So I can't have debuggable code and many important warnings at the dv same time? Yep. I agree it's a drag--I've often felt that the -O0 flag or something should have a side-effect of doing the optimization warning checks, but then not actually optimizing the resulting code. Actually I'm not sure about many important warnings; I think the only two warnings which are enabled only for optimization are uninitialized variables (which is certainly important, I grant you) Especially when you are used to rely on it. and nonvolatile automatic variables being changed by longjmp... which is rarely useful. I misspoke last time about the unused variables: those are warned even without -O. It's the uninitialized variables that aren't warned unless you enable -O. Bye Dominik ^_^ ^_^ -- Visit the official FVWM web page at URL:http://www.fvwm.org/. To unsubscribe from the list, send unsubscribe fvwm-workers in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
Re: compiler warning/bug in FvwmScript/script.y
On 17:44 14 Nov 2002, Dominik Vogt fvwm-workers@fvwm.org wrote: | On Thu, Nov 14, 2002 at 11:04:59AM -0500, Paul Smith wrote: | %% Dominik Vogt fvwm-workers@fvwm.org writes: |dv Heck! Why isn't that mentioned in the gcc info page?! | | You mean like this: | These warnings are possible only in optimizing compilation, [...] | ? :) | | Sorry, I somehow missed that paragraph. I just can't operate info | :-/ You may want my man script, which presents info as one of the choices for manual pages. More to the point, it parses info files and turns them into a single flat text document, which of course you browse with your pager as with ordinary manual entries. It's certainly made info accessable for me. To be sure, there are no hyperlinks, but the link targets _are_ presented in the text, and the your pager's search function should find them fairly well. Just FYI. Cheers, -- Cameron Simpson, DoD#743[EMAIL PROTECTED]http://www.zip.com.au/~cs/ I'd hate to be one to quibble over grammar, but your statement above is fallacious even if true.- [EMAIL PROTECTED] (Bill Conner) -- Visit the official FVWM web page at URL:http://www.fvwm.org/. To unsubscribe from the list, send unsubscribe fvwm-workers in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]
Re: compiler warning/bug in FvwmScript/script.y
%% Cameron Simpson [EMAIL PROTECTED] writes: | Sorry, I somehow missed that paragraph. I just can't operate info | :-/ cs You may want my man script, which presents info as one of the cs choices for manual pages. More to the point, it parses info files cs and turns them into a single flat text document, which of course cs you browse with your pager as with ordinary manual entries. Info is quite accessible if you spend a few minutes learning the command set--there are only about 10 keys :). In particular, the s (search) and i (index lookup) are critically important to know. Once you know these you can do more with Info that you can do with either man pages or HTML. -- --- Paul D. Smith [EMAIL PROTECTED] HASMAT--HA Software Mthds Tools Please remain calm...I may be mad, but I am a professional. --Mad Scientist --- These are my opinions---Nortel Networks takes no responsibility for them. -- Visit the official FVWM web page at URL:http://www.fvwm.org/. To unsubscribe from the list, send unsubscribe fvwm-workers in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]