This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/78536] New: #define something doesn't work


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78536

            Bug ID: 78536
           Summary: #define something doesn't work
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: contact@it-kovac.com
  Target Milestone: ---

Hello, I encounter a similar problem as
http://stackoverflow.com/questions/40804244 whilst trying to build the legacy
LineMode browser (available on
http://cdn.browserarchive.org/worldwideweb/NeXT/WWWLineMode_0.11a.tar.gz) using
GCC 4.9.2 (Debian 8):

WWW/LineMode/Implementation/ultrix_cc$ make
cc -c  -I../../../Implementation/ -I../ ../../../Implementation/HTFTP.c
../../../Implementation/HTFTP.c:46:20: error: expected identifier before
numeric constant
 #define IPPORT_FTP 21
                    ^
../CommonMakefile:52: recipe for target 'HTFTP.o' failed
make: *** [HTFTP.o] Error 1

Note that the line in question is wrapped by an ifndef / endif:

#ifndef IPPORT_FTP
#define IPPORT_FTP 21
#endif

I would expect some compatibility issues with this code from the early 90s,
however #define IPPORT_FTP 21 should work just as fine as "#define whatever"
should... Something definitely seems broken in this specific version of GCC.

If something can be done about it even though 4.9.2 is relatively old now (yet
still the default compiler in current Debian stable), that would really be
nice!

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]