mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 21:33:59 +08:00
C89-compliant quines
From-SVN: r26768
This commit is contained in:
parent
d234235cb4
commit
50e0211ea0
2
gcc/pself4.c
Normal file
2
gcc/pself4.c
Normal file
@ -0,0 +1,2 @@
|
||||
#include <stdio.h>
|
||||
int main(void){char*p="#include <stdio.h>%cint main(void){char*p=%c%s%c;(void)printf(p,10,34,p,34,10);return 0;}%c";(void)printf(p,10,34,p,34,10);return 0;}
|
5
gcc/pself5.c
Normal file
5
gcc/pself5.c
Normal file
@ -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;}
|
Loading…
Reference in New Issue
Block a user