Article View: gnu.gcc.help
Article #49962Defines?
From: Gert van der Zwan
Date: Wed, 01 Dec 1993 10:25
Date: Wed, 01 Dec 1993 10:25
17 lines
1174 bytes
1174 bytes
Hello,
This may be a stupid question, but
can someone explain to me why the following (in an include file)
#define d define
#d NUM 32
struct a { char aa[NUM]; };
leads to the error message:
In file included from test.c:1:
test.h:6: `NUM' undeclared here (not in a function)
whereas
#define NUM 32
struct a { char aa[NUM]; };
compiles with no problems. (using gcc2.4.5 with linux 0.99pl13)
(i got this from a header file which apparently compiled well on a SUN and which uses the first
construct (i.e the #define d define a very large number of times).
Gert van der Zwan
Technical Details
Message-ID:
<1993Dec1.112527.3966@news.sara.nl>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!pipex!uunet!EU.net!sun4nl!news.sara.nl!v61u0005Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,64ec6d548068851b,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-12-01 06:19:29 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!pipex!uunet!EU.net!sun4nl!news.sara.nl!v61u0005 Newsgroups: gnu.gcc.help Subject: Defines? Message-ID: <1993Dec1.112527.3966@news.sara.nl> From: v61u0005@diamond.sara.nl (Gert van der Zwan) Date: 1 Dec 93 11:25:27 +0100 Distribution: world Organization: SARA Nntp-Posting-Host: diamond.sara.nl Originator: v61u0005@diamond.sara.nl Lines: 17