To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2832
2831  |  2833
Subject: 
Re: Warning cleanup questions with gcc3.2
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 5 Sep 2002 21:50:34 GMT
Viewed: 
2174 times
  
John Jorgensen wrote:

a) warning: multi-line string literals are deprecated
   These seem to be mostly quotes around blocks of assembly code.

I am running 3.1 and got the same error. But for user programs only
because a line in boot/config.h is too long. In fact this is no error
but just a warning. Looks bad but the code is ok.

b) warning: const qualifier ignored on asm
   These seem to be due to things like this;

#define bit_set(byte,bit) \
__asm__ ASMCONST ( "bset %0,@%1\n" : : "i" (bit),"r" (byte))

   I believe the right thing to do here is to remove the "ASMCONST".

If you look at the beginning of the file (I think it is bitops.h), there
is a statement like

#ifdef CXX
# define ASMCONST
#else
# define ASMCONST const
#endif

Changing this to

#define ASMCONST

will help.To be backward compatible to old gcc, one should check for the
gcc version but I haven't done this yet.

So the questions I have are; Are these backward compatible solutions? Are
they good solutions? Should I spend the time to whip up a patch that will
touch a lot of files...

I think the warning messages for the deprecated stuff building the
kernel are annoying but no problem at all. But I don't want to have such
messages while compiling a user program, because I once compile the
kernel but often compile my user programs. So I changed the long line in
config.h, did the small change in bitops.h and have no warnings in my
user programs.

Regards,

Michael



Message has 1 Reply:
  Re: Warning cleanup questions with gcc3.2
 
(...) However it should be fixed, as there's no guarantee future versions of gcc will support deprecated features. ROSCO (22 years ago, 5-Sep-02, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Warning cleanup questions with gcc3.2
 
When compiling brickos with gcc3.2, I get a lot (about 360 or so) of warnings about two things; a) warning: multi-line string literals are deprecated These seem to be mostly quotes around blocks of assembly code. Some of the code in lib/mint seems (...) (22 years ago, 5-Sep-02, to lugnet.robotics.rcx.legos)

5 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR