zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Don't use the workaround for unused function parameters when compiling with clang on OS X.
@ 2013-05-09 13:16 Mihai Moldovan
  2013-05-09 14:43 ` Lawrence Velázquez
  0 siblings, 1 reply; 3+ messages in thread
From: Mihai Moldovan @ 2013-05-09 13:16 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 133 bytes --]


Signed-off-by: Mihai Moldovan <ionic@ionic.de>
---
 Src/zsh_system.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Don-t-use-the-workaround-for-unused-function-paramet.patch --]
[-- Type: text/x-patch; name="0001-Don-t-use-the-workaround-for-unused-function-paramet.patch", Size: 460 bytes --]

diff --git a/Src/zsh_system.h b/Src/zsh_system.h
index f385330..e68fd62 100644
--- a/Src/zsh_system.h
+++ b/Src/zsh_system.h
@@ -773,7 +773,7 @@ extern short ospeed;
 # define IS_DIRSEP(c) ((c) == '/')
 #endif
 
-#if defined(__GNUC__) && !defined(__APPLE__)
+#if defined(__GNUC__) && (!defined(__APPLE__) || defined(__clang__))
 /* Does the OS X port of gcc still gag on __attribute__? */
 #define UNUSED(x) x __attribute__((__unused__))
 #else


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4506 bytes --]

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

* Re: [PATCH] Don't use the workaround for unused function parameters when compiling with clang on OS X.
  2013-05-09 13:16 [PATCH] Don't use the workaround for unused function parameters when compiling with clang on OS X Mihai Moldovan
@ 2013-05-09 14:43 ` Lawrence Velázquez
  2013-05-10 17:41   ` Mihai Moldovan
  0 siblings, 1 reply; 3+ messages in thread
From: Lawrence Velázquez @ 2013-05-09 14:43 UTC (permalink / raw)
  To: Mihai Moldovan; +Cc: zsh-workers

On May 9, 2013, at 9:16 AM, Mihai Moldovan <ionic@ionic.de> wrote:

> <0001-Don-t-use-the-workaround-for-unused-function-paramet.patch>

Is this patch correct for all versions of Clang?

vq


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

* Re: [PATCH] Don't use the workaround for unused function parameters when compiling with clang on OS X.
  2013-05-09 14:43 ` Lawrence Velázquez
@ 2013-05-10 17:41   ` Mihai Moldovan
  0 siblings, 0 replies; 3+ messages in thread
From: Mihai Moldovan @ 2013-05-10 17:41 UTC (permalink / raw)
  To: Lawrence Velázquez; +Cc: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 382 bytes --]

* On 09.05.2013 04:43 PM, Lawrence Velázquez wrote:
> Is this patch correct for all versions of Clang? 

Working with 2.9 and up. Likewise, as clang is also setting the __GNUC__ macro,
this attribute has been used even with clang since it was included (on
non-Darwin, that is.)
There is no reason to not make clang on Darwin use the attribute.

Best regards



Mihai


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4506 bytes --]

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

end of thread, other threads:[~2013-05-10 17:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-09 13:16 [PATCH] Don't use the workaround for unused function parameters when compiling with clang on OS X Mihai Moldovan
2013-05-09 14:43 ` Lawrence Velázquez
2013-05-10 17:41   ` Mihai Moldovan

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).