public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/14634] New: Unterminated literals not diagnosed
@ 2004-03-18 16:34 jsm28 at gcc dot gnu dot org
2004-03-18 17:08 ` [Bug preprocessor/14634] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2004-03-18 16:34 UTC (permalink / raw)
To: gcc-bugs
Unterminated string and character constants are no longer diagnosed when
the preprocessing tokens are not converted to tokens, even with -pedantic
-Wall -Wextra. This is a regression in quality of implementation. For
example, the following unportable code is not diagnosed.
#if 0
#error "
'
#endif
#define foo '
Furthermore, this contradicts the cpp documentation. A previous request
to document these extensions
<http://gcc.gnu.org/ml/gcc-patches/2003-04/msg01855.html>
does not seem to have resulted in any documentation of them, and cpp.texi
still says
# Do not use @code{#if 0} for comments which are not C code. Use a real
# comment, instead. The interior of @code{#if 0} must consist of complete
# tokens; in particular, single-quote characters must balance.
and
# Neither @samp{#error} nor @samp{#warning} macro-expands its argument.
# Internal whitespace sequences are each replaced with a single space.
# The line must consist of complete tokens. It is wisest to make the
# argument of these directives be a single string constant; this avoids
# problems with apostrophes and the like.
--
Summary: Unterminated literals not diagnosed
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jsm28 at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14634
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/14634] [3.4/3.5 Regression] Unterminated literals not diagnosed
2004-03-18 16:34 [Bug preprocessor/14634] New: Unterminated literals not diagnosed jsm28 at gcc dot gnu dot org
@ 2004-03-18 17:08 ` pinskia at gcc dot gnu dot org
2004-03-18 17:13 ` jsm at polyomino dot org dot uk
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-18 17:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-18 17:08 -------
I thought that this was undefined behavior and that is why 12743 was closed?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |documentation
Last reconfirmed|0000-00-00 00:00:00 |2004-03-18 17:08:32
date| |
Summary|Unterminated literals not |[3.4/3.5 Regression]
|diagnosed |Unterminated literals not
| |diagnosed
Target Milestone|--- |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14634
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/14634] [3.4/3.5 Regression] Unterminated literals not diagnosed
2004-03-18 16:34 [Bug preprocessor/14634] New: Unterminated literals not diagnosed jsm28 at gcc dot gnu dot org
2004-03-18 17:08 ` [Bug preprocessor/14634] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-03-18 17:13 ` jsm at polyomino dot org dot uk
2004-03-18 17:25 ` zack at codesourcery dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jsm at polyomino dot org dot uk @ 2004-03-18 17:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jsm at polyomino dot org dot uk 2004-03-18 17:13 -------
Subject: Re: [3.4/3.5 Regression] Unterminated
literals not diagnosed
On Thu, 18 Mar 2004, pinskia at gcc dot gnu dot org wrote:
> I thought that this was undefined behavior and that is why 12743 was closed?
That it's undefined is why I described it as a quality of implementation
regression rather than a conformance regression. Quality of
implementation dictates that we should not lose the feature of diagnosing
unportable code even though a diagnostic is not required. (I prefer a
mandatory error for all these usages - since no good justification was
ever given for these extensions - but a pedwarn if pedantic would suffice
to give portability warnings to those wanting them.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14634
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/14634] [3.4/3.5 Regression] Unterminated literals not diagnosed
2004-03-18 16:34 [Bug preprocessor/14634] New: Unterminated literals not diagnosed jsm28 at gcc dot gnu dot org
2004-03-18 17:08 ` [Bug preprocessor/14634] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-03-18 17:13 ` jsm at polyomino dot org dot uk
@ 2004-03-18 17:25 ` zack at codesourcery dot com
2004-03-18 17:36 ` jsm at polyomino dot org dot uk
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: zack at codesourcery dot com @ 2004-03-18 17:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From zack at codesourcery dot com 2004-03-18 17:25 -------
Subject: Re: [3.4/3.5 Regression] Unterminated
literals not diagnosed
It used to be a mandatory error, and that was changed for reasons that
I no longer remember. Can you try to dig up the discussion
surrounding the change?
zw
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14634
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/14634] [3.4/3.5 Regression] Unterminated literals not diagnosed
2004-03-18 16:34 [Bug preprocessor/14634] New: Unterminated literals not diagnosed jsm28 at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-03-18 17:25 ` zack at codesourcery dot com
@ 2004-03-18 17:36 ` jsm at polyomino dot org dot uk
2004-03-18 18:15 ` zack at codesourcery dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jsm at polyomino dot org dot uk @ 2004-03-18 17:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jsm at polyomino dot org dot uk 2004-03-18 17:35 -------
Subject: Re: [3.4/3.5 Regression] Unterminated
literals not diagnosed
On Thu, 18 Mar 2004, zack at codesourcery dot com wrote:
> It used to be a mandatory error, and that was changed for reasons that
> I no longer remember. Can you try to dig up the discussion
> surrounding the change?
Neil's patch was
<http://gcc.gnu.org/ml/gcc-patches/2003-04/msg01827.html>. I didn't and
don't see the value in the extensions listed in the message but not
documented; I don't think there was further discussion of them.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14634
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/14634] [3.4/3.5 Regression] Unterminated literals not diagnosed
2004-03-18 16:34 [Bug preprocessor/14634] New: Unterminated literals not diagnosed jsm28 at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-03-18 17:36 ` jsm at polyomino dot org dot uk
@ 2004-03-18 18:15 ` zack at codesourcery dot com
2004-05-29 23:18 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: zack at codesourcery dot com @ 2004-03-18 18:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From zack at codesourcery dot com 2004-03-18 18:15 -------
Subject: Re: [3.4/3.5 Regression] Unterminated
literals not diagnosed
The value of extensions 1 and 2 (from Neil's list) was that we used to
get regular bug reports complaining about them not working. I suspect
there wer complaints about 3 not working, too, but less frequently.
Anyhow, take this up with Neil, I have too many other things on my
plate.
zw
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14634
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/14634] [3.4/3.5 Regression] Unterminated literals not diagnosed
2004-03-18 16:34 [Bug preprocessor/14634] New: Unterminated literals not diagnosed jsm28 at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-03-18 18:15 ` zack at codesourcery dot com
@ 2004-05-29 23:18 ` mmitchel at gcc dot gnu dot org
2004-05-30 15:24 ` neil at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-05-29 23:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-05-28 22:17 -------
Neil --
Please comment on this PR.
-- Mark
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |neil at daikokuya dot co dot
| |uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14634
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/14634] [3.4/3.5 Regression] Unterminated literals not diagnosed
2004-03-18 16:34 [Bug preprocessor/14634] New: Unterminated literals not diagnosed jsm28 at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-05-29 23:18 ` mmitchel at gcc dot gnu dot org
@ 2004-05-30 15:24 ` neil at gcc dot gnu dot org
2004-05-30 16:35 ` pinskia at gcc dot gnu dot org
2004-06-05 20:29 ` mmitchel at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: neil at gcc dot gnu dot org @ 2004-05-30 15:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From neil at gcc dot gnu dot org 2004-05-29 08:29 -------
The behaviour is as I intended. IMO we don't need a diagnostic. If someone
feels we should have one I won't oppose a reasonable patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14634
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/14634] [3.4/3.5 Regression] Unterminated literals not diagnosed
2004-03-18 16:34 [Bug preprocessor/14634] New: Unterminated literals not diagnosed jsm28 at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-05-30 15:24 ` neil at gcc dot gnu dot org
@ 2004-05-30 16:35 ` pinskia at gcc dot gnu dot org
2004-06-05 20:29 ` mmitchel at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-30 16:35 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14634
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/14634] [3.4/3.5 Regression] Unterminated literals not diagnosed
2004-03-18 16:34 [Bug preprocessor/14634] New: Unterminated literals not diagnosed jsm28 at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-05-30 16:35 ` pinskia at gcc dot gnu dot org
@ 2004-06-05 20:29 ` mmitchel at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-05 20:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-06-05 20:29 -------
I've removed the target milestone; adding a warning for this extension is not
release-critical now or ever.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.1 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14634
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-06-05 20:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-18 16:34 [Bug preprocessor/14634] New: Unterminated literals not diagnosed jsm28 at gcc dot gnu dot org
2004-03-18 17:08 ` [Bug preprocessor/14634] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-03-18 17:13 ` jsm at polyomino dot org dot uk
2004-03-18 17:25 ` zack at codesourcery dot com
2004-03-18 17:36 ` jsm at polyomino dot org dot uk
2004-03-18 18:15 ` zack at codesourcery dot com
2004-05-29 23:18 ` mmitchel at gcc dot gnu dot org
2004-05-30 15:24 ` neil at gcc dot gnu dot org
2004-05-30 16:35 ` pinskia at gcc dot gnu dot org
2004-06-05 20:29 ` mmitchel at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).