linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions
@ 2012-03-15 14:15 Frederic Crozat
  2012-03-15 20:02 ` Christopher Li
  2012-03-23  8:26 ` Christopher Li
  0 siblings, 2 replies; 6+ messages in thread
From: Frederic Crozat @ 2012-03-15 14:15 UTC (permalink / raw)
  To: linux-sparse

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

Hi,

while working on integrating sparse checks in systemd, I noticed some
builtin functions need to be added to sparse list. See attached patch
for the fix.

I've also noted patch from Pekka Enberg
(http://www.spinics.net/lists/linux-sparse/msg02520.html ) is still
needed when running sparse on x86-64. It would be nice to merge it in
git.

-- 
Frederic Crozat <fcrozat@suse.com>
SUSE


[-- Attachment #2: 0001-Add-__builtin_stpcpy-and-__sync_synchronize-to-decla.patch --]
[-- Type: text/x-patch, Size: 1279 bytes --]

From 1fc7c049236924a7ce1ccd0488d5f38b99763055 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Wed, 29 Feb 2012 15:50:14 +0100
Subject: [PATCH] Add __builtin_stpcpy and __sync_synchronize to
 declare_builtin_functions

---
 lib.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib.c b/lib.c
index 396e9f1..be0fa8f 100644
--- a/lib.c
+++ b/lib.c
@@ -682,6 +682,7 @@ void declare_builtin_functions(void)
 	add_pre_buffer("extern __SIZE_TYPE__ __builtin_strspn(const char *, const char *);\n");
 	add_pre_buffer("extern __SIZE_TYPE__ __builtin_strcspn(const char *, const char *);\n");
 	add_pre_buffer("extern char * __builtin_strpbrk(const char *, const char *);\n");
+	add_pre_buffer("extern char* __builtin_stpcpy(const char *, const char*);\n");
 	add_pre_buffer("extern __SIZE_TYPE__ __builtin_strlen(const char *);\n");
 
 	/* And bitwise operations.. */
@@ -714,6 +715,7 @@ void declare_builtin_functions(void)
 	add_pre_buffer("extern long __builtin_alpha_cmpbge(long, long);\n");
 	add_pre_buffer("extern long __builtin_labs(long);\n");
 	add_pre_buffer("extern double __builtin_fabs(double);\n");
+	add_pre_buffer("extern void __sync_synchronize();\n");
 
 	/* Add Blackfin-specific stuff */
 	add_pre_buffer(
-- 
1.7.7


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

end of thread, other threads:[~2012-03-23 17:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 14:15 Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions Frederic Crozat
2012-03-15 20:02 ` Christopher Li
2012-03-23  8:26 ` Christopher Li
2012-03-23  9:32   ` Frederic Crozat
2012-03-23 10:22     ` Frederic Crozat
2012-03-23 17:48       ` Christopher Li

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).