Re: Installing Newt



On 2007-06-30, swylieguard-google@xxxxxxxxxxx scribbled these
curious markings:
I'm trying to install Newt on a Kubuntu 7 box using CPAN shell and get
a message:

listbox.c: in function listboxEvent:

listbox.c: 634: error: label at end of compound statement.

Since you didn't say *which* version of newt, I'm going to have to guess
that you're trying to install the latest version.

Around line 634 of listbox.c is this beautiful code:

case NEWT_KEY_END:
if(li->numItems <= 0) break;
li->startShowItem = li->numItems - li->curHeight;
if(li->startShowItem < 0)
li->startShowItem = 0;
li->currItem = li->numItems - 1;
newtListboxRealSetCurrent(co);
er.result = ER_SWALLOWED;
break;
default:
/* keeps gcc quiet */
}
break;

Interestingly, the line that "keeps gcc quiet" is the line that breaks
things. Removing the C<default:> line fixes things, at least for my
compiler. I've no idea whether the code will actually finish building,
though, because it seems to have been written in an extremely unportable
fashion (<alloca.h> and friends... may as well do #ifndef LINUX #error
"no newt for you" #endif). Seems to me like this code was written for
either an older compiler, a broken, RH-specific compiler, or both. Good
luck, I hope you know C, and GCC's oft-weird implementation thereof.

Best Regards,
Christopher Nehren
.



Relevant Pages

  • Problems with OmniORB
    ... checking for C compiler default output file name... ... checking errno.h usability... ... checking errno.h presence... ... `label, may be used uninitialized in this function ...
    (comp.object.corba)
  • Re: UART RS232 "hello world" really taking shape now.
    ... indexed by label number. ... executed at ELABORATION time - the COMPILER takes ... the hardware just sees a lookup table. ... MSG "At B" ...
    (comp.arch.fpga)
  • Re: Basic blocks and compilers
    ... Notice also that .L3 jumps to .L1 instead of just falling through. ... On machines that have a separate compare instruction and non-computing ... It looks like the compiler created a new block label for each HLL ...
    (comp.compilers)
  • Re: Help with wierd/unexplainable error
    ... > If xarg <= xThen GoTo 5 ... > flagr = y ... > affected the compiler and now it doesn't like that label (note that it did ...
    (microsoft.public.office.developer.vba)
  • Re: old fortran construct
    ... > I have some code that compiled with ifc. ... > label and false jump to the other label? ... a branch to 5 from within the inner loop causes ... confusion to the compiler: which loop cycles after a GOTO to 5? ...
    (comp.lang.fortran)