This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/63326] whether a #pragma is a statement depends on the type of pragma


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]