On Tue, Sep 16, 2014 at 10:32:51PM +, Joseph S. Myers wrote:
This is getting closer, but it looks like you still treat it as a line
comment when being skipped for C90, when actually it's not safe to treat
it like that; you have to produce a '/' preprocessing token and continue
On Wed, 17 Sep 2014, Marek Polacek wrote:
Sure, updated.
Bootstrap in progress, regtested on x86_64-linux, ok for trunk?
2014-09-17 Marek Polacek pola...@redhat.com
PR c/61854
libcpp/
* init.c (struct lang_flags): Remove cplusplus_comments.
(cpp_set_lang):
On Mon, 15 Sep 2014, Marek Polacek wrote:
On Mon, Sep 15, 2014 at 05:49:25PM +, Joseph S. Myers wrote:
On Mon, 15 Sep 2014, Marek Polacek wrote:
We must be careful to properly handle code such as 1 //**/ 2, which
has a different meaning in C90 and GNU90 mode. New testcases test
PR 61854 points out that using // comments in C90 mode without
GNU extensions enabled results in a suboptimal error such as:
error: expected expression before ‘/’ token
This patch improves this diagnostics, so that the compiler now says
C++ style comments are forbidden in C90.
We must be careful
On Mon, 15 Sep 2014, Marek Polacek wrote:
We must be careful to properly handle code such as 1 //**/ 2, which
has a different meaning in C90 and GNU90 mode. New testcases test this.
I don't think there's sufficient allowance here for other valid cases.
It's valid to have // inside #if 0 in
On Mon, Sep 15, 2014 at 05:49:25PM +, Joseph S. Myers wrote:
On Mon, 15 Sep 2014, Marek Polacek wrote:
We must be careful to properly handle code such as 1 //**/ 2, which
has a different meaning in C90 and GNU90 mode. New testcases test this.
I don't think there's sufficient