Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
50e0211e
Commit
50e0211e
authored
May 04, 1999
by
Zack Weinberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C89-compliant quines
From-SVN: r26768
parent
d234235c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
gcc/pself4.c
+2
-0
gcc/pself5.c
+5
-0
No files found.
gcc/pself4.c
0 → 100644
View file @
50e0211e
#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
;}
gcc/pself5.c
0 → 100644
View file @
50e0211e
#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
;}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment