[cfe-commits] [PATCH] Fix getcontext builtin

Dimitry Andric dimitry at andric.com
Fri Nov 4 17:04:24 PDT 2011


On the same note as my previous post, the prototype for the built-in
function getcontext is incorrect, which leads to warnings like (when
compiling with -Wsystem-headers):

  In file included from ssjtest.c:2:
  /usr/include/ucontext.h:74:5: warning: incompatible redeclaration of library function 'getcontext'
  int     getcontext(ucontext_t *);
	  ^
  /usr/include/ucontext.h:74:5: note: 'getcontext' is a builtin with type 'int (struct _jmp_buf *)'

The actual prototype is:

  int getcontext(ucontext_t *);

Since there was no specific AST SpecialType for ucontext_t, I had to add
it, which is why this patch is a bit larger.  I randomly chose the
letter 'K' to represent the ucontext_t type in Builtins.def.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-getcontext-builtin-1.diff
Type: text/x-diff
Size: 9580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111105/5de5b221/attachment.diff>


More information about the cfe-commits mailing list