Re: [Freeciv-Dev] (PR#39722) gcc-4.2 -O2 compile fails as predicted

2007-11-28 Thread Jordi Negrevernis i Font

http://bugs.freeciv.org/Ticket/Display.html?id=39722 >

>
> 
>
>
> 2007/11/27, Daniel Markstedt <[EMAIL PROTECTED] 
> >:
>
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39722 >
>
> On Nov 27, 2007 5:44 PM, Jordi Negrevernis i Font
> < [EMAIL PROTECTED]
> > wrote:
> >
> > http://bugs.freeciv.org/Ticket/Display.html?id=39722 >
> >
> > William Allen Simpson wrote:
> > > http://bugs.freeciv.org/Ticket/Display.html?id=39722 >
> > >
> > > Castanier Carl wrote:
> > >
> > >> ho, sorry was a pepeto comment :) you can't read them :)
> > >> Anyway, I can't talk about it since I can't read any tickets
> and I can't see
> > >> what I wrote.
> > >>
> > >>
> > > Ah, another child.  There are at least 3 ways to read the
> reports.  And of
> > > course, surely you saved your own email on your own computer.
> > >
> >
> > What he says it's true. I can't read any ticket with the
> guest acount.
> >
> > Ah, and i'm not a child! :-)
> >
> >
>
> Can you try again now?
>
>
> hehe link is bad. I understand now
> http://bugs.freeciv.org/SelfService/Display.html?id=39722 
> 
> work but  http://bugs.freeciv.org/Ticket/Display.html?id=39722 is 
> wrong query.
>
> Guest cannot search (which is a major drawback) but you can enter
> ticket numbers directly.
>
>
>  
> Ffield "go to tickets" works now. I apologize then.
> I'm baby :)
>
?
Anyway, this URL 
'http://bugs.freeciv.org/Ticket/Display.html?id=39722' that appears on 
top of the message does not work.

OTOH, entering the ticket number on the ticket list page now 
works... some progress... ;-) Thanks for fixing this...




___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39722) gcc-4.2 -O2 compile fails as predicted

2007-11-27 Thread Castanier Carl

http://bugs.freeciv.org/Ticket/Display.html?id=39722 >

2007/11/27, Daniel Markstedt <[EMAIL PROTECTED]>:
>
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39722 >
>
> On Nov 27, 2007 5:44 PM, Jordi Negrevernis i Font
> <[EMAIL PROTECTED]> wrote:
> >
> > http://bugs.freeciv.org/Ticket/Display.html?id=39722 >
> >
> > William Allen Simpson wrote:
> > > http://bugs.freeciv.org/Ticket/Display.html?id=39722 >
> > >
> > > Castanier Carl wrote:
> > >
> > >> ho, sorry was a pepeto comment :) you can't read them :)
> > >> Anyway, I can't talk about it since I can't read any tickets and I
> can't see
> > >> what I wrote.
> > >>
> > >>
> > > Ah, another child.  There are at least 3 ways to read the
> reports.  And of
> > > course, surely you saved your own email on your own computer.
> > >
> >
> > What he says it's true. I can't read any ticket with the guest
> acount.
> >
> > Ah, and i'm not a child! :-)
> >
> >
>
> Can you try again now?


hehe link is bad. I understand now
http://bugs.freeciv.org/SelfService/Display.html?id=39722
work but  http://bugs.freeciv.org/Ticket/Display.html?id=39722 is wrong
query.

Guest cannot search (which is a major drawback) but you can enter
> ticket numbers directly.



Ffield "go to tickets" works now. I apologize then.
I'm baby :)



-- 
Carl

2007/11/27, Daniel Markstedt <[EMAIL PROTECTED]>:
http://bugs.freeciv.org/Ticket/Display.html?id=39722 >On Nov 27, 2007 5:44 PM, Jordi Negrevernis i Font<
[EMAIL PROTECTED]> wrote:>> http://bugs.freeciv.org/Ticket/Display.html?id=39722 >>> William Allen Simpson wrote:
> > http://bugs.freeciv.org/Ticket/Display.html?id=39722 >> >> > Castanier Carl wrote:> >> >> ho, sorry was a pepeto comment :) you can't read them :)
> >> Anyway, I can't talk about it since I can't read any tickets and I can't see> >> what I wrote.> >>> >>> > Ah, another child.  There are at least 3 ways to read the reports.  And of
> > course, surely you saved your own email on your own computer.> >>> What he says it's true. I can't read any ticket with the guest acount.>> Ah, and i'm not a child! :-)
>>Can you try again now?hehe link is bad. I understand nowhttp://bugs.freeciv.org/SelfService/Display.html?id=39722
work but   http://bugs.freeciv.org/Ticket/Display.html?id=39722 is wrong query.
Guest cannot search (which is a major drawback) but you can enterticket numbers directly. Ffield "go to tickets" works now. I apologize then.I'm baby :)
-- Carl
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39722) gcc-4.2 -O2 compile fails as predicted

2007-11-27 Thread Daniel Markstedt

http://bugs.freeciv.org/Ticket/Display.html?id=39722 >

On Nov 27, 2007 5:44 PM, Jordi Negrevernis i Font
<[EMAIL PROTECTED]> wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39722 >
>
> William Allen Simpson wrote:
> > http://bugs.freeciv.org/Ticket/Display.html?id=39722 >
> >
> > Castanier Carl wrote:
> >
> >> ho, sorry was a pepeto comment :) you can't read them :)
> >> Anyway, I can't talk about it since I can't read any tickets and I can't 
> >> see
> >> what I wrote.
> >>
> >>
> > Ah, another child.  There are at least 3 ways to read the reports.  And of
> > course, surely you saved your own email on your own computer.
> >
>
> What he says it's true. I can't read any ticket with the guest acount.
>
> Ah, and i'm not a child! :-)
>
>

Can you try again now?

Guest cannot search (which is a major drawback) but you can enter
ticket numbers directly.



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39722) gcc-4.2 -O2 compile fails as predicted

2007-11-27 Thread Jordi Negrevernis i Font

http://bugs.freeciv.org/Ticket/Display.html?id=39722 >

William Allen Simpson wrote:
> http://bugs.freeciv.org/Ticket/Display.html?id=39722 >
>
> Castanier Carl wrote:
>   
>> ho, sorry was a pepeto comment :) you can't read them :)
>> Anyway, I can't talk about it since I can't read any tickets and I can't see
>> what I wrote.
>>
>> 
> Ah, another child.  There are at least 3 ways to read the reports.  And of
> course, surely you saved your own email on your own computer.
>   

What he says it's true. I can't read any ticket with the guest acount.

Ah, and i'm not a child! :-)




___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#39722) gcc-4.2 -O2 compile fails as predicted

2007-11-26 Thread Jason Short

http://bugs.freeciv.org/Ticket/Display.html?id=39722 >

Indeed, this is officially a gcc bug, explained in 39459 in more detail.

https://bugzilla.novell.com/show_bug.cgi?id=300410

Nonetheless I see no problem with working around it (as 39459 did).  In
general we should strive to remove pointer-to-int casts like this as
they seem to be an ongoing problem.

The attached patch removes the (bad) assumption that CMA_NONE is -1,
changes CMA_NONE and CMA_CUSTOM to be positive (it doesn't use the
cmafec_preset_num value as this is variable), and adds an assertion to
trigger if there's a problem.  I will commit to all branches (without
the assertion for 2.1).

-jason

Index: client/gui-gtk-2.0/cityrep.c
===
--- client/gui-gtk-2.0/cityrep.c	(revision 14078)
+++ client/gui-gtk-2.0/cityrep.c	(working copy)
@@ -52,9 +52,11 @@
 #include "cityrep.h"
 
 #define NEG_VAL(x)  ((x)<0 ? (x) : (-x))
-#define CMA_NONE	(-1)
-#define CMA_CUSTOM	(-2)
 
+/* Some versions of gcc have problems with negative values here (PR#39722). */
+#define CMA_NONE	(1)
+#define CMA_CUSTOM	(10001)
+
 enum city_operation_type {
   CO_CHANGE, CO_LAST, CO_NEXT, CO_FIRST, CO_NONE
 };
@@ -542,12 +544,18 @@
   gtk_menu_item_set_submenu(parent_item, menu);
 
   if (change_cma) {
-for (i = -1; i < cmafec_preset_num(); i++) {
-  w = (i == -1 ? gtk_menu_item_new_with_label(_("none"))
-	   : gtk_menu_item_new_with_label(cmafec_preset_get_descr(i)));
+w = gtk_menu_item_new_with_label(_("none"));
+gtk_menu_shell_append(GTK_MENU_SHELL(menu), w);
+g_signal_connect(w, "activate", G_CALLBACK(select_cma_callback),
+		 GINT_TO_POINTER(CMA_NONE));
+assert(GPOINTER_TO_INT(GINT_TO_POINTER(CMA_NONE)) == CMA_NONE);
+
+for (i = 0; i < cmafec_preset_num(); i++) {
+  w = gtk_menu_item_new_with_label(cmafec_preset_get_descr(i));
   gtk_menu_shell_append(GTK_MENU_SHELL(menu), w);
   g_signal_connect(w, "activate", G_CALLBACK(select_cma_callback),
 		   GINT_TO_POINTER(i));
+  assert(GPOINTER_TO_INT(GINT_TO_POINTER(i)) == i);
 }
   } else {
 /* search for a "none" */
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39722) gcc-4.2 -O2 compile fails as predicted

2007-11-26 Thread Castanier Carl

http://bugs.freeciv.org/Ticket/Display.html?id=39722 >

2007/11/26, William Allen Simpson <[EMAIL PROTECTED]>:
>
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39722 >
>
> Castanier Carl wrote:
> > ho, sorry was a pepeto comment :) you can't read them :)
> > Anyway, I can't talk about it since I can't read any tickets and I can't
> see
> > what I wrote.
> >
> Ah, another child.  There are at least 3 ways to read the reports.  And of
> course, surely you saved your own email on your own computer.

I use report bug interface when I post a patch.


> yep, but options must be tested in configure.ac  :))
> >
> Our configure.ac does not have -O2 by default.
>
>
> > You need to put -02 option explicitly by CFLAGS.
> >
> We already warned you not to do this.  There's an old saying,
>
>"If it hurts when you do that -- stop doing it."
>
>
> -O2, If you can make the test, it can hapend with -O1. It's written on my
tickets. Forward me it and I can answer clearly.

  "I like it"

-- 
Carl

2007/11/26, William Allen Simpson <[EMAIL PROTECTED]>:
http://bugs.freeciv.org/Ticket/Display.html?id=39722 >Castanier Carl wrote:> ho, sorry was a pepeto comment :) you can't read them :)
> Anyway, I can't talk about it since I can't read any tickets and I can't see> what I wrote.>Ah, another child.  There are at least 3 ways to read the reports.  And ofcourse, surely you saved your own email on your own computer.
I use report bug interface when I post a patch.> yep, but options must be tested in 
configure.ac  :))>Our configure.ac does not have -O2 by default.> You need to put -02 option explicitly by CFLAGS.>We already warned you not to do this.  There's an old saying,
   "If it hurts when you do that -- stop doing it."-O2, If you can make the test, it can hapend with -O1. It's written on my tickets. Forward me it and I can answer clearly.
  "I like it"-- Carl
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39722) gcc-4.2 -O2 compile fails as predicted

2007-11-26 Thread William Allen Simpson

http://bugs.freeciv.org/Ticket/Display.html?id=39722 >

Castanier Carl wrote:
> ho, sorry was a pepeto comment :) you can't read them :)
> Anyway, I can't talk about it since I can't read any tickets and I can't see
> what I wrote.
> 
Ah, another child.  There are at least 3 ways to read the reports.  And of
course, surely you saved your own email on your own computer.


> yep, but options must be tested in configure.ac  :))
> 
Our configure.ac does not have -O2 by default.


> You need to put -02 option explicitly by CFLAGS.
> 
We already warned you not to do this.  There's an old saying,

   "If it hurts when you do that -- stop doing it."



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev