public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/59805] New: invalid preprocessing directive not diagnosed with assembler-with-cpp
@ 2014-01-14 14:04 aldot at gcc dot gnu.org
2014-10-01 10:30 ` [Bug preprocessor/59805] " aldot at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: aldot at gcc dot gnu.org @ 2014-01-14 14:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59805
Bug ID: 59805
Summary: invalid preprocessing directive not diagnosed with
assembler-with-cpp
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: aldot at gcc dot gnu.org
CC: tromey at redhat dot com
-x assembler-with-cpp remains silent instead of emitting some kind of
diagnostics.
$ cat libcpp-bug.c
# INCLUDE <./does-not-exist.HHH>
# HUH <./does-not-exist.HHH>
$ gcc -x assembler-with-cpp -o xxx.o -c libcpp-bug.c -W -Wall -pedantic -Wextra
Properly diagnosed with c or c-header:
$ gcc -x c -o xxx.o -c libcpp-bug.c -W -Wall -pedantic -Wextra
libcpp-bug.c:1:3: error: invalid preprocessing directive #INCLUDE
# INCLUDE <./does-not-exist.HHH>
^
libcpp-bug.c:2:3: error: invalid preprocessing directive #HUH
# HUH <./does-not-exist.HHH>
^
libcpp-bug.c:2:0: warning: ISO C forbids an empty translation unit [-Wpedantic]
# HUH <./does-not-exist.HHH>
^
gcc-4.9-trunk@206144
Since the #INCLUDE was not processed this missing diagnostics resulted in wrong
code generated, but adding that keyword.
Didn't look if this is a driver bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug preprocessor/59805] invalid preprocessing directive not diagnosed with assembler-with-cpp
2014-01-14 14:04 [Bug preprocessor/59805] New: invalid preprocessing directive not diagnosed with assembler-with-cpp aldot at gcc dot gnu.org
@ 2014-10-01 10:30 ` aldot at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: aldot at gcc dot gnu.org @ 2014-10-01 10:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59805
Bernhard Reutner-Fischer <aldot at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |joseph at codesourcery dot com
--- Comment #1 from Bernhard Reutner-Fischer <aldot at gcc dot gnu.org> ---
CCing jsm.
I am undecided if this is a valid request after all.
On one hand this is not a valid preprocessing token, on the other hand this
behaviour might be ok with respect to ASM_COMMENT_START.
Thoughts?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-01 10:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14 14:04 [Bug preprocessor/59805] New: invalid preprocessing directive not diagnosed with assembler-with-cpp aldot at gcc dot gnu.org
2014-10-01 10:30 ` [Bug preprocessor/59805] " aldot 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).