cleanup winner README.md files
Fixed cases where there was a bad trailing backslash. Improved a few cases where a code block was needed to highlight some text. Changed a few cases where a code block needed to declared as, say, a sh code block. Fixed a few cases where the winner information was not properly formatted. Plus a few nits and clarifying text was added.
This commit is contained in:
1 parent
394f710bc3
commit
360708f858
120 files changed
+1198
-1024
No files matched your search
+20
-20
@@ -221,19 +221,19 @@ C compilers.
|
||||
must resemble one of the canonical forms, `"foo.h"` or `<bar.h>`.
|
||||
This lets us write things like
|
||||
|
||||
```c\
|
||||
#define HEADER "foo.h"
|
||||
#include HEADER
|
||||
```
|
||||
```c
|
||||
#define HEADER "foo.h"
|
||||
#include HEADER
|
||||
```
|
||||
|
||||
I could not find a compiler rejecting this. However, if we're
|
||||
torturing the preprocessor a little more, by using token pasting,
|
||||
at least one compiler falls over.
|
||||
|
||||
```c
|
||||
#define H(x) <st##x##.h>
|
||||
#include H(dio) /* expands to <stdio.h> */
|
||||
```
|
||||
```c
|
||||
#define H(x) <st##x##.h>
|
||||
#include H(dio) /* expands to <stdio.h> */
|
||||
```
|
||||
|
||||
is rejected by tcc version 4.1.2, the TenDRA compiler:
|
||||
```
|
||||
@@ -253,21 +253,21 @@ C compilers.
|
||||
ISO 6.8.4. ISO 6.1.4 defines string literals as s-char-sequences,
|
||||
which may include octal escape sequences. Let's look at
|
||||
|
||||
```c
|
||||
#include <stdio.h>
|
||||
#line 42 "foo\0bar"
|
||||
int main (void) {
|
||||
printf ("%s %d\n", __FILE__, (int)sizeof __FILE__);
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
```c
|
||||
#include <stdio.h>
|
||||
#line 42 "foo\0bar"
|
||||
int main (void) {
|
||||
printf ("%s %d\n", __FILE__, (int)sizeof __FILE__);
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
This is supposed to output `'foo 8'`. Here's what happens in RL:
|
||||
|
||||
```
|
||||
foo 4 gcc 2.7.2.1, lcc
|
||||
foo\0bar 9 tcc 4.1.2, Sunsoft cc turn "\0" into "\\0", ugh!
|
||||
```
|
||||
```
|
||||
foo 4 gcc 2.7.2.1, lcc
|
||||
foo\0bar 9 tcc 4.1.2, Sunsoft cc turn "\0" into "\\0", ugh!
|
||||
```
|
||||
|
||||
(I have written a bug report for gcc. Newer versions and egcs are ok.)
|
||||
|
||||
|
||||
Reference in new issue
Block a user