lcc-win32一致性问题 [英] lcc-win32 conformance question
问题描述
如果我编译这个程序
int main(无效)
{
返回0; // foo bar baz
}
with
" lc -A -ansi89 foo.c"
(减去报价),没有产生诊断;但是这种样式在C89中是不合法的,因此这段代码应该是无效的?
符合标准的是什么(未命名的编译器) ?
teapot写道:
如果我编译这个程序
int main(无效)
{
返回0; // foo bar baz
}
with
" lc -A -ansi89 foo.c"
(减去报价),没有产生诊断;但是这种样式在C89中是不合法的,因此这段代码应该是无效的?
符合标准的是什么(未命名的编译器) ?
你为什么询问C ++小组?
-
Ian Collins 。
Ian Collins写道:
teapot写道:
>如果我编译这个程序
int main(void)
{
返回0; // foo bar baz
< />
< lc -A -ansi89 foo.c"
(减去引号),没有产生诊断;但这样的评论风格在C89中是不合法的,因此这段代码应该无效?
符合标准的是什么(未命名的编译器)?
你为什么要问一个C ++小组?
哎呀,我错了,错误的小组打开...
-
Ian Collins。
" teapot" < te*@pot.invalidwrote in message
news:19 **************** @ aioe.org ...
>
如果我编译这个程序
int main(无效)
{
返回0; // foo bar baz
}
with
" lc -A -ansi89 foo.c"
(减去报价),没有产生诊断;但是这种样式在C89中是不合法的,因此这段代码应该是无效的?
符合标准的是什么(未命名的编译器) ?
你的意思是,这个未命名的编译器叫做lcc-win32?
好吧,我无法收到错误信息从中。既没有使用
DigitalMars DMC -A。
GCC当然抱怨,但随后它有10000个选项会很奇怪
,如果它错过了那个。
对不起,我没有更多的命令行编译器可以尝试..
我猜有些是严格符合的,有些是不是。也许应该
是颁发给符合条件的证书,以便在心不在焉地阻止你
潜入//一两条评论!
-
bartc
If I compile this program
int main(void)
{
return 0; // foo bar baz
}
with
"lc -A -ansi89 foo.c"
(minus the quotes), no diagnostic is produced; but isn''t this style of
comment illegal in C89 and thus this piece of code should be invalid?
How standards conformant is (unnamed compiler)?
teapot wrote:If I compile this program
int main(void)
{
return 0; // foo bar baz
}
with
"lc -A -ansi89 foo.c"
(minus the quotes), no diagnostic is produced; but isn''t this style of
comment illegal in C89 and thus this piece of code should be invalid?
How standards conformant is (unnamed compiler)?
Why are you asking on a C++ group?
--
Ian Collins.
Ian Collins wrote:teapot wrote:>If I compile this program
int main(void)
{
return 0; // foo bar baz
}
with
"lc -A -ansi89 foo.c"
(minus the quotes), no diagnostic is produced; but isn''t this style of
comment illegal in C89 and thus this piece of code should be invalid?
How standards conformant is (unnamed compiler)?
Why are you asking on a C++ group?
Oops, I buggered that up, wrong group open...
--
Ian Collins.
"teapot" <te*@pot.invalidwrote in message
news:19****************@aioe.org...>
If I compile this program
int main(void)
{
return 0; // foo bar baz
}
with
"lc -A -ansi89 foo.c"
(minus the quotes), no diagnostic is produced; but isn''t this style of
comment illegal in C89 and thus this piece of code should be invalid?
How standards conformant is (unnamed compiler)?You mean, the unnamed compiler called lcc-win32?
Well, I couldn''t get an error message from it. Neither from using
DigitalMars DMC -A.
GCC of course complained, but then with it''s 10000 options it would be odd
if it missed that one.
Sorry I didn''t have any more command-line compilers to try..
I guess some are strictly conformant are some aren''t. Perhaps there should
be a certificate issued to conformant ones to stop you absentmindedly
sneaking in a // comment or two!
--
bartc
这篇关于lcc-win32一致性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!