Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread John Levon
On Thu, Mar 13, 2003 at 02:47:28PM +0100, Andre Poenitz wrote: > > I asked about this on the gcc list, then realised it probably makes > > sense: what if you compile lyx on a system where 'a' is > 128, and char > > signed ? (in the general sense of course). > > In this case a warning might be in

Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread Andre Poenitz
On Thu, Mar 13, 2003 at 12:52:58PM +, John Levon wrote: > I asked about this on the gcc list, then realised it probably makes > sense: what if you compile lyx on a system where 'a' is > 128, and char > signed ? (in the general sense of course). In this case a warning might be in order. However

Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread John Levon
On Thu, Mar 13, 2003 at 02:09:22PM +0100, Lars Gullik Bj?nnes wrote: > I think that the "basic source character set" is required to be ASCII. > The wording in ISO/IEC 14882:1998(E) 2.2.1 seems to imply this. I'm afraid I don't have a C++ standard. Does it not contain the wording about the '0'-'9'

Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | > "John" == John Levon <[EMAIL PROTECTED]> writes: | | John> On Thu, Mar 13, 2003 at 10:29:44AM +0100, Jean-Marc Lasgouttes | John> wrote: | Lars> Perfectly valid warning, it is only strange in this specific | Lars> case since 'a' is used and

Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes: John> On Thu, Mar 13, 2003 at 10:29:44AM +0100, Jean-Marc Lasgouttes John> wrote: Lars> Perfectly valid warning, it is only strange in this specific Lars> case since 'a' is used and that cannot be wrong... 'å' on the Lars> other hand... >> So

Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread John Levon
On Thu, Mar 13, 2003 at 10:29:44AM +0100, Jean-Marc Lasgouttes wrote: > Lars> Perfectly valid warning, it is only strange in this specific > Lars> case since 'a' is used and that cannot be wrong... 'å' on the > Lars> other hand... > > So, why does the compiler generate a warning, since it knows t

Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread Andre Poenitz
On Thu, Mar 13, 2003 at 10:49:52AM +0100, Lars Gullik Bjønnes wrote: > You saw my casts? (or did they say unsinged int? that was not > intended.) I thought they said 'int', but I am not sure. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they des

Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Thu, Mar 13, 2003 at 10:35:53AM +0100, Lars Gullik Bjønnes wrote: | > The warning is a bout a small possibly/possibly not signed type used | > to index an array. | | So a solution would be to use 'unsigned char'? Yes. You saw my casts? (or did they

Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread Andre Poenitz
On Thu, Mar 13, 2003 at 10:35:53AM +0100, Lars Gullik Bjønnes wrote: > The warning is a bout a small possibly/possibly not signed type used > to index an array. So a solution would be to use 'unsigned char'? Andre' -- Those who desire to give up Freedom in order to gain Security, will not have,

Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | > "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: | | Lars> Perfectly valid warning, it is only strange in this specific | Lars> case since 'a' is used and that cannot be wrong... 'å' on the | Lars> other hand... | | So, why does t

Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Perfectly valid warning, it is only strange in this specific Lars> case since 'a' is used and that cannot be wrong... 'å' on the Lars> other hand... So, why does the compiler generate a warning, since it knows that the value is

Re: [PATCH] GCC 3.3 warnings.

2003-03-13 Thread Andre Poenitz
On Thu, Mar 13, 2003 at 08:51:44AM +0100, Lars Gullik Bjønnes wrote: > I saw another fix proposed at the boost list: > > Use [0 + c] to force integer promotion. > > Also as been mentioned on this list, why use direct setting of the > arrat anyway? Why not use the "setter" function alread

Re: [PATCH] GCC 3.3 warnings.

2003-03-12 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | I must have missed some point. Yes. -- Lgb

Re: [PATCH] GCC 3.3 warnings.

2003-03-12 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Wed, Mar 12, 2003 at 07:34:02PM +0100, Lars Gullik Bjønnes wrote: | > This patch fixes some GCC 3.3 warnings. If this is the best way to do | > it can be argued. | > | > Comments? | | I don't like it. | | If anything at all I'd accept a functions s

Re: [PATCH] GCC 3.3 warnings.

2003-03-12 Thread Andre Poenitz
On Wed, Mar 12, 2003 at 07:09:23PM +, Angus Leeming wrote: > -theCatcode['&'] = catAlign; > +theCatcode[static_cast('\\')] = catEscape; > > Why not: > > setCatcode('&', catAlign); Because that's simply assigning a value to an array element. I ordinarily do not use a

Re: [PATCH] GCC 3.3 warnings.

2003-03-12 Thread Andre Poenitz
On Wed, Mar 12, 2003 at 07:34:02PM +0100, Lars Gullik Bjønnes wrote: > This patch fixes some GCC 3.3 warnings. If this is the best way to do > it can be argued. > > Comments? I don't like it. If anything at all I'd accept a functions style cast char c; foo[int(c)]; but we'd better look f

Re: [PATCH] GCC 3.3 warnings.

2003-03-12 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: | | > This patch fixes some GCC 3.3 warnings. If this is the best way to | > do it can be argued. | > | > Comments? | | -theCatcode['&'] = catAlign; | +theCatcode[static_cast('\\')] = catEscape; | | Why not

Re: [PATCH] GCC 3.3 warnings.

2003-03-12 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: | | > This patch fixes some GCC 3.3 warnings. If this is the best way to | > do it can be argued. | > | > Comments? | | Why not do it properly and make papersize2 of type vector::size_type? | In fact, don't we have a lyx::i

Re: [PATCH] GCC 3.3 warnings.

2003-03-12 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > This patch fixes some GCC 3.3 warnings. If this is the best way to > do it can be argued. > > Comments? -theCatcode['&'] = catAlign; +theCatcode[static_cast('\\')] = catEscape; Why not: setCatcode('&', catAlign); void setCatcode(char c, CA

Re: [PATCH] GCC 3.3 warnings.

2003-03-12 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > This patch fixes some GCC 3.3 warnings. If this is the best way to > do it can be argued. > > Comments? Why not do it properly and make papersize2 of type vector::size_type? In fact, don't we have a lyx::index_type that could fit here? I've looked through a whole h

[PATCH] GCC 3.3 warnings.

2003-03-12 Thread Lars Gullik Bjønnes
This patch fixes some GCC 3.3 warnings. If this is the best way to do it can be argued. Comments? Index: src/bufferparams.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/bufferparams.C,v retrieving revision 1.48 diff -u -p -r1.