view tests/mpp/good/misc.out @ 8:ec2b657edf13

Add explicit lint-comment-style fallthrough annotations. GCC now assumes that if you don't have these you're making a mistake, which is annoying. XXX: This changeset updates the AG output files only (by hand) and is XXX: abusive - rebuilding them will erase the change. However, I need XXX: to get things to build before I can try to get AG to issue the XXX: annotations itself, so this seems like a reasonable expedient.
author David A. Holland
date Mon, 30 May 2022 23:51:43 -0400
parents 13d2b8934445
children
line wrap: on
line source

////////////////////////////////////////////////////////////
...line splicing
he llo
//comment
//comment
SPL IT
int c='\012';
const char*x="blah \012";
////////////////////////////////////////////////////////////
...digraphs
%:hi
fu%:%:bar
%:<:
%::>
%:<%
%:%>
%:%:
%:
%:%:
%:define FOO 123
wrong
%:undef FOO
right
////////////////////////////////////////////////////////////
...comments
a/b;
a=b/blah
-c;
/* not comment */
// not comment
<a b>
not comment
stuff//comment staff
(should be stuff staff on one line)
stuff staff
(should be stuff staff on one line)
////////////////////////////////////////////////////////////
...conditionals
right
right
right
right
right
right
right
right
right
right
right
right
right
right
right
defined(2)should have a 2 in it
defined(THREE)should not be changed
right
right
right
right
right
right
wrong
wrong
right
right
right
////////////////////////////////////////////////////////////
...definitions
aa
DD
EE
aa()
bb
DD()
DD(,)
EE(,)
DD(,,)
EE(,,)
gg should be gg
right
fedine should be fedine
dunef should be dunef
difnef should be difnef
right
right
right
right
right
right
wrong
(1,2)(3,4)(5,6)
SUM(1,2)should be 1+2
../../../src/tests/mpp/misc.c: Line 393, Column 5: Syntax error in constant expression in macro expansion
wrong
SUM(1,SUM(2,3))should be 1+2+3
TWO+1 should be two+1
...legal redefinitions
////////////////////////////////////////////////////////////
...stringize
"a b c"should be"a b c"
"a   b   c"should be"a b c"
"\"stry\\n\""should be"\"stry\\n\""
"b"should be"b"
"a b"should be"a b"
"a   b"should be"a b"
"SUM(1,2)"should give"SUM(1,2)",not"1+2"
"SUM"(3,4)should give"SUM"(3,4),not"3+4"
////////////////////////////////////////////////////////////
...concat
"1H 2"should be"1 H 2"
"1H2"should be"1 ## 2"
...pasting of punctuation is not allowed
++
--
<<=
>>=
<<=
>>=
<>=
<CAT(<,=)
>CAT(>,=)
++
--
<<=
>>=
<<=
>>=
<>=
<<=
>>=
100 should be 100
"bast"--->"bast"
KLU should be"KLU"
10//comment
IDENTITYIDENTITY(z)should be IDENTITYIDENTITY(z)
IDENTITY( z)should be IDENTITYz
12 should be 12
////////////////////////////////////////////////////////////
...directive recognition
right
right
right
right
////////////////////////////////////////////////////////////
...keywords
right
////////////////////////////////////////////////////////////
...builtin macros
__STDC__ should be 1
__STDC_VERSION__ should be a date