public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52648] New: remove string literal by preprocessor
@ 2012-03-21 4:09 sahoorajesh2011 at gmail dot com
2012-03-21 6:55 ` [Bug c/52648] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: sahoorajesh2011 at gmail dot com @ 2012-03-21 4:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52648
Bug #: 52648
Summary: remove string literal by preprocessor
Classification: Unclassified
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: sahoorajesh2011@gmail.com
when compling...below problem exists..
main()
{
/*printf("this is a student from india*/");*/
}
if this code compiled...then
instead of removing the whole line
it only remove upto "*/" present inside a string literal.
and also giving a preprocessor error..
I think this is a minor bug which can be fixed very easily..
after compilation code is...
main()
{
");*/
}
I think that this should be...
main()
{
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/52648] remove string literal by preprocessor
2012-03-21 4:09 [Bug c/52648] New: remove string literal by preprocessor sahoorajesh2011 at gmail dot com
@ 2012-03-21 6:55 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-03-21 6:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52648
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-21 04:09:28 UTC ---
No that is correct. the comment starts at /* and ends at the first */. The
preprocessor does not tokenize stuff inside comments at all so "" is not taken
into account. This is different from a #if block where it is tokenized.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-21 4:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-21 4:09 [Bug c/52648] New: remove string literal by preprocessor sahoorajesh2011 at gmail dot com
2012-03-21 6:55 ` [Bug c/52648] " pinskia at gcc dot gnu.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).