Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Unary minus and bitwise complement

Reply
Thread Tools

Unary minus and bitwise complement

 
 
James Kuyper
Guest
Posts: n/a
 
      03-22-2013
On 03/21/2013 06:27 PM, Phil Carmody wrote:
> James Kuyper <(E-Mail Removed)> writes:
>> On 03/21/2013 03:59 PM, glen herrmannsfeldt wrote:

....
>>> Note, though, that as someone mentioned, in the case of integer
>>> promotion of smaller types, signed is still relevant.

>>
>> That was me, in the message I posted with the header
>> Date: Tue, 19 Mar 2013 12:10:49 -0400

>
> Indeed, good catch for the generalisation of the question.
> However, wouldn't a simple '1u' rather than '1' fix that case?


Yes, that's an obvious conclusion from what I wrote, but I didn't think
to mention it.
--
James Kuyper
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is happening with this Unary minus? Todd Burch Ruby 3 08-27-2007 09:22 PM
Overloading unary minus for use in function calls Matthew Cook C++ 6 12-20-2006 10:04 PM
Semantics of unary minus Marc C Programming 13 02-13-2006 04:52 PM
Lazy fun: Make unary minus silence stderr for backticks Sam Stephenson Ruby 9 11-07-2005 03:36 PM
Unary minus applied to unsigned int Andrew Ward C++ 6 09-26-2003 03:19 PM



Advertisments