diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-05-04 15:15:48 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-05-04 15:15:48 +0000 |
commit | 79048c7d6c68ab62e5732bef0606792d2dde66e1 (patch) | |
tree | 6ba8ee9a0bda18b121584898f341c657456ed77f /gcc/pself5.c | |
parent | 3bbeea9db170d9584c61c27a59135648aaeff284 (diff) | |
download | gcc-79048c7d6c68ab62e5732bef0606792d2dde66e1.tar.gz |
C89-compliant quines
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26768 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/pself5.c')
-rw-r--r-- | gcc/pself5.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/pself5.c b/gcc/pself5.c new file mode 100644 index 00000000000..8f6f8e3b26f --- /dev/null +++ b/gcc/pself5.c @@ -0,0 +1,5 @@ +#include <stdio.h> +#define N '\n' +#define Q '\"' +#define B '\\' +int main(void){char*p="#include <stdio.h>%c#define N '%cn'%c#define Q '%c%c'%c#define B '%c%c'%cint main(void){char*p=%c%s%c;(void)printf(p,N,B,N,B,Q,N,B,B,N,Q,p,Q,N);return 0;}%c";(void)printf(p,N,B,N,B,Q,N,B,B,N,Q,p,Q,N);return 0;} |