Re(2): (void)printf() vs. printf() 
Author Message
 Re(2): (void)printf() vs. printf()


Quote:

Evens) writes:

>> >Using (void) is simply a safeguard.  The thing I like least about C is
>> >that is will do cast automatically, which can cause errors in some
>> >cases.  Using explicit casts is just safer.

>> A safeguard against what?

I don't know if I'd call using it a safeguard, but doesn't the ANSI Rationale
threaten to require casts such as these in a future standard?  I personally
don't like it and doubt whether such a requirement would make it into a
standard.


Sent from Oregon Telcom



Tue, 17 Dec 1996 11:27:52 GMT  
 Re(2): (void)printf() vs. printf()

Quote:


>Evens) writes:

>>> >Using (void) is simply a safeguard.  The thing I like least about C is
>>> >that is will do cast automatically, which can cause errors in some
>>> >cases.  Using explicit casts is just safer.

>>> A safeguard against what?

>I don't know if I'd call using it a safeguard, but doesn't the ANSI Rationale
>threaten to require casts such as these in a future standard?  I personally

Quote, please.

Dan
--
Dan Pop
CERN, CN Division

Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland



Tue, 17 Dec 1996 21:25:40 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Re(2): Re(2): (void)printf() vs. printf()

2. (void)printf() vs. printf()

3. replacing printf with my printf, then calling C lib's printf

4. newbie and (void)printf..

5. Speed consideration in (void)printf(..)

6. printf("%p\n",(void *) ptr);

7. cout vs printf()

8. printf vs fprintf

9. printf %p vs. %x

10. 2 printf's vs. a ternary

11. cout vs printf

12. printf vs. vprintf

 

 
Powered by phpBB® Forum Software