This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/63326] whether a #pragma is a statement depends on the type of pragma
- From: "gang.chen.5i5j at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 Nov 2015 14:26:51 +0000
- Subject: [Bug c/63326] whether a #pragma is a statement depends on the type of pragma
- Auto-submitted: auto-generated
- References: <bug-63326-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63326
--- Comment #19 from Chen Gang <gang.chen.5i5j at gmail dot com> ---
(In reply to Andrew Pinski from comment #18)
> (In reply to Chen Gang from comment #17)
> > I guess the diff below should be OK, I shall give a make check test.
>
> I would rather have the C front-end behavior for C++ rather than the
> opposite way around. Because _Pragma are considered statements.
For me, this bug is related with the demands (language definition), and C need
not be part of C++.
- For me, what cc1plus has done is OK: C++ looks that it always 'likes' more
new features, and want to let the users (C++ programmer) use the language
freely and in common sense.
- But for C, if one feature is in discussing, it should not be treated as a
common features (C standard is more stricter than C++). So we need not care
about this 'bug' quite much (In real world, C programmers need not use #pragma
in this way).
In our case (this cc1 'bug'), Instead of returning the 'anbisous' result (it
may cause misunderstanding for C/C++ programmers more or less), cc1 need report
error during compiling.