public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/12543] New: ISO C requires whitespace after the mac
@ 2003-10-08 22:38 sfm_9 at yahoo dot com
  2003-10-08 23:06 ` [Bug c/12543] " falk at debian dot org
  0 siblings, 1 reply; 2+ messages in thread
From: sfm_9 at yahoo dot com @ 2003-10-08 22:38 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=12543

           Summary: ISO C requires whitespace after the mac
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sfm_9 at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: ISO C requires whitespace after the mac
  GCC host triplet: ISO C requires whitespace after the mac
GCC target triplet: ISO C requires whitespace after the mac

I have this code,
OS: red hat linux 8. kernel version:2.4.18-14
gcc version: 3.2

#include <stdio.h>
#define CONST=10
#define max (a,b) (((a) > (b)) ? (a): (b))

main()
{
   int i;

   i = max (20, CONST);

   printf("El mayor de %d y %d es %d\n", 20, CONST, i);
}

I compiled with:
gcc prep1.c -E -o prep1.i
prep1.c:2:14: warning: ISO C requires whitespace after the macro name

an afer with:
gcc prep1.c -o prep1
prep1.c:2:14: warning: ISO C requires whitespace after the macro name
prep1.c: In function `main':
prep1.c:9: `a' undeclared (first use in this function)
prep1.c:9: (Each undeclared identifier is reported only once
prep1.c:9: for each function it appears in.)
prep1.c:9: `b' undeclared (first use in this function)
prep1.c:9: parse error before '=' token
prep1.c:11: parse error before '=' token

i dont know why gave that errors..


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

* [Bug c/12543] ISO C requires whitespace after the mac
  2003-10-08 22:38 [Bug c/12543] New: ISO C requires whitespace after the mac sfm_9 at yahoo dot com
@ 2003-10-08 23:06 ` falk at debian dot org
  0 siblings, 0 replies; 2+ messages in thread
From: falk at debian dot org @ 2003-10-08 23:06 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=12543


falk at debian dot org changed:

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


------- Additional Comments From falk at debian dot org  2003-10-08 23:06 -------
You want

#define CONST 10

and

#define max(a,b) (((a) > (b)) ? (a): (b))

Please read a good book on C.


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

end of thread, other threads:[~2003-10-08 23:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-08 22:38 [Bug c/12543] New: ISO C requires whitespace after the mac sfm_9 at yahoo dot com
2003-10-08 23:06 ` [Bug c/12543] " falk at debian 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).