public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/12568] New: preprocessor typo-line #ekse ignored
@ 2003-10-10 14:03 gcc-bugzilla at gcc dot gnu dot org
  2003-10-10 14:41 ` [Bug preprocessor/12568] " schwab at suse dot de
  2004-04-16 21:27 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2003-10-10 14:03 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12568

           Summary: preprocessor typo-line #ekse ignored
           Product: gcc
           Version: 3.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mathar at mpia-hd dot mpg dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.8
  GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8

  If we start some lines of code by using a #if... or #ifndef
  or #if define "first" line, a line of the sort  #ekse   (that is a typo
  and was meant to read #else) is ignored and all the code up to the
  final #endif is ignored. There should be a syntax warning of the same
  kind as if we start the construct with a #if or #ifndef  that is "true".

Environment:
System: SunOS wminrts 5.8 Generic_108528-11 sun4u sparc SUNW,Ultra-60
Architecture: sun4

host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: sparc-sun-solaris2.8
Configured with: /diska/home/vltmgr/VLTSW/PRODUCTS/gnu/SunOS-5.8/gcc-3.2.1/configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c++,f77 --prefix=/vlt/APR2003/gnu

How-To-Repeat:

  Source-code t.c:

int main(int argc, char *argv[])
{
#if 0
   int dummy= 1 ;
#ekse
    int dummy= 0 ;
#endif
    return 0 ;
}


 compiled with

   gcc -save-temps -v -Wall -pedantic -o t t.c

Reading specs from /vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/specs
Configured with: /diska/home/vltmgr/VLTSW/PRODUCTS/gnu/SunOS-5.8/gcc-3.2.1/configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c++,f77 --prefix=/vlt/APR2003/gnu
Thread model: posix
gcc version 3.2.1
 /vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/cpp0 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=1 -D__GXX_ABI_VERSION=102 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__WCHAR_TYPE__=long int -D__WINT_TYPE__=long int -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc t.c -Wall -pedantic t.i
GNU CPP version 3.2.1 (cpplib) (sparc ELF)
ignoring nonexistent directory "/vlt/APR2003/gnu/sparc-sun-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /vlt/APR2003/gnu/include
 /vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/include
 /usr/include
End of search list.
 /vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/cc1 -fpreprocessed t.i -quiet -dumpbase t.c -Wall -pedantic -version -o t.s
GNU CPP version 3.2.1 (cpplib) (sparc ELF)
GNU C version 3.2.1 (sparc-sun-solaris2.8)
        compiled by GNU C version 3.2.1.
 /usr/ccs/bin/as -V -Qy -s -o t.o t.s
/usr/ccs/bin/as: Sun WorkShop 6 99/08/18
 /vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/collect2 -V -Y P,/usr/ccs/lib:/usr/lib -Qy -o t /vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/crt1.o /vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/crti.o /usr/ccs/lib/values-Xa.o /vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/crtbegin.o -L/vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1 -L/vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/../../../../sparc-sun-solaris2.8/lib -L/usr/ccs/bin -L/usr/ccs/lib -L/vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/../../.. t.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc /vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/crtend.o /vlt/APR2003/gnu/lib/gcc-lib/sparc-sun-solaris2.8/3.2.1/crtn.o
ld: Software Generation Utilities - Solaris-ELF (4.0)


  preprocessor output:

# 1 "t.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "t.c"
int main(int argc, char *argv[])
{





    return 0 ;
}
------- Additional Comments From mathar at mpia-hd dot mpg dot de  2003-10-10 14:02 -------
Fix:
  No known fix but to check carefully all the #e.. kinds of preprocessor
  lines. Note that     #if 1 .... #ekse .... #endif reports a syntax
  error, and this is what one would also expect from the 
  #if 0 .... #ekse .... #endif version..


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug preprocessor/12568] preprocessor typo-line #ekse ignored
  2003-10-10 14:03 [Bug preprocessor/12568] New: preprocessor typo-line #ekse ignored gcc-bugzilla at gcc dot gnu dot org
@ 2003-10-10 14:41 ` schwab at suse dot de
  2004-04-16 21:27 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: schwab at suse dot de @ 2003-10-10 14:41 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12568


schwab at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


------- Additional Comments From schwab at suse dot de  2003-10-10 14:41 -------
The standard requires that unknown preprocessing directives are ignored.  Since 
the text inside the non-taken branch of an if directive is ignored except for 
breaking it up into preprocessing tokens the example is completely well formed.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug preprocessor/12568] preprocessor typo-line #ekse ignored
  2003-10-10 14:03 [Bug preprocessor/12568] New: preprocessor typo-line #ekse ignored gcc-bugzilla at gcc dot gnu dot org
  2003-10-10 14:41 ` [Bug preprocessor/12568] " schwab at suse dot de
@ 2004-04-16 21:27 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-16 21:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-16 20:19 -------
*** Bug 14986 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trt at acm dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12568


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-16 20:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-10 14:03 [Bug preprocessor/12568] New: preprocessor typo-line #ekse ignored gcc-bugzilla at gcc dot gnu dot org
2003-10-10 14:41 ` [Bug preprocessor/12568] " schwab at suse dot de
2004-04-16 21:27 ` pinskia 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).