bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23993: [PATCH] Fix cursor display (bug#23993)


From: Clément Pit--Claudel
Subject: bug#23993: [PATCH] Fix cursor display (bug#23993)
Date: Sat, 16 Jul 2016 11:13:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

On 2016-07-15 22:15, Alan Third wrote:
> Eli, I just wanted to run this by you because you wrote this code and
> I'm not sure if that =- is just a typo or it's something I've never
> seen before. My guess is it's a typo and gcc happily treats it as -=,
> but clang handles it more like 'y = y - a - b' resulting in odd
> behaviour on OS X.

In fact, both Clang and GCC treat it the same (as '=' followed by a unary 
minus):

#include <stdio.h>

int main () {
  int y = 1;
  y =- 1; // Same as y = -1;
  printf("%d\n", y); // Prints "-1"
}

Interestingly, clang warns about this:

    5   5 warning         use of unary operator that may be intended as 
compound assignment (-=) (c/c++-clang)

Thanks for spotting it!
Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]