Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: Compiler Warnings
@ 2010-01-18 19:07 Roger
  0 siblings, 0 replies; 8+ messages in thread
From: Roger @ 2010-01-18 19:07 UTC (permalink / raw)


Yes I 100% agree with the point that conversion from pointer to interger
will lose half value of pointer and we should not write any code that way. 
BUT this is a general rule that applies to normal circumstance. I believe a
rule can be bent under special/different circumstances.  This case is one
of these special/different circumsatance.  I believe C compiler gives
warnings to every possible mistakes just to be on the safe side. If you
check the codes that got these warnings you will see that you really don't
need to worry about them.  one of the code that got warning message is:
    int offset = (int)cmd->info;
And I don't see any problem with that line unless there is something I
don't know.
also another warning is about an integer been passed into a function then
the function passed this integer as pointer into another function. there
should not be any problem later if the pointer is converted to interger.
Other warnings are simliar to the cases I just showed above.
And btw I am not someone that "just ignore the warnings on integer <->
pointer conversions" principle.

-Roger

----------
> From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
> To: axp-list@redhat.com
> Subject: Re: Compiler Warnings
> Date: Saturday, January 18, 1997 12:27 PM
> 
> 
> > 
> > > I am trying to compile apache-1.2b4, and everything compiles
> > > properly except for warnings of the type:
> > > 
> > > "conversion from pointer to integer of different type."
> > > 
> Roger responds:
> 
> > Just ignore the warnings.
> 
> Sigh!  The best advice to produce broken executables.
> 
> You may get lucky sometimes - as the original author did not really
> meant "pointer" when s/he wrote that; and conversions **from** integer
> **to** pointer can be often ignored.  But converting from a pointer
> to integer on axp you are loosing half of yours - possibly significant -
> bits.  This makes wonders to your references and a stack.
> 
> > I compiled 
> > apache-1.2b4 with these warnings, but the server is running fine
without
> > any problems so far.
> 
> Wait and see.  A grail error, which I posted just yesterday, is
> most likely caused by somebody following "just ignore the warnings
> on integer <-> pointer conversions" principle.
> 
>   Michal
> 
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <199701181907.OAA07989@sable.cc.vt.edu>]
[parent not found: <199701180109.JAA03936@tapa.admu.edu.ph>]
* Re: Compiler Warnings
@ 1997-01-18  3:04 Roger
  1997-01-18 17:27 ` Michal Jaegermann
  0 siblings, 1 reply; 8+ messages in thread
From: Roger @ 1997-01-18  3:04 UTC (permalink / raw)


----------
> From: Pablo Manalastas <pmana@tapa.admu.edu.ph>
> To: axp-list@redhat.com
> Subject: Compiler Warnings
> Date: Friday, January 17, 1997 8:09 PM
> 
> I am trying to compile apache-1.2b4, and everything compiles
> properly except for warnings of the type:
> 
> "conversion from pointer to integer of different type."
> 
> I guess this has to do with the fact that Alpha's pointers are
> 8 bytes but ints are 4 bytes only.  Can I safely ignore these
> warnings (my machine is only 96MB anyway) or must I correct
> the ints to longs?
> 
> Thank you for your help.
> 
> -Pablo-
> 
Just ignore the warnings. When you compling as long as you don't
get any errors everything should be ok. I compiled 
apache-1.2b4 with these warnings, but the server is running fine without
any
problems so far.

-Roger

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Compiler Warnings
@ 1997-01-18  1:09 Pablo Manalastas
  0 siblings, 0 replies; 8+ messages in thread
From: Pablo Manalastas @ 1997-01-18  1:09 UTC (permalink / raw)


I am trying to compile apache-1.2b4, and everything compiles
properly except for warnings of the type:

"conversion from pointer to integer of different type."

I guess this has to do with the fact that Alpha's pointers are
8 bytes but ints are 4 bytes only.  Can I safely ignore these
warnings (my machine is only 96MB anyway) or must I correct
the ints to longs?

Thank you for your help.

-Pablo-

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-01-18 19:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-18 19:07 Compiler Warnings Roger
     [not found] <199701181907.OAA07989@sable.cc.vt.edu>
1997-01-18 20:47 ` Michal Jaegermann
1997-01-18 21:31 ` Richard Henderson
     [not found] <199701180109.JAA03936@tapa.admu.edu.ph>
1997-01-18 16:22 ` Richard Henderson
1997-01-20 11:41 ` Jim Nance
  -- strict thread matches above, loose matches on Subject: below --
1997-01-18  3:04 Roger
1997-01-18 17:27 ` Michal Jaegermann
1997-01-18  1:09 Pablo Manalastas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox