www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikola Milutinovic <Nikola.Milutino...@ev.co.yu>
Subject config/8926: DEC CC has a problem with indented C Pre-Processor directives
Date Sun, 02 Dec 2001 17:15:59 GMT

>Number:         8926
>Category:       config
>Synopsis:       DEC CC has a problem with indented C Pre-Processor directives
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sun Dec 02 09:20:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Nikola.Milutinovic@ev.co.yu
>Release:        1.3.2x and 2.0.x
>Organization:
apache
>Environment:
Digital UNIX 4.0D/F, using native CC

uname -a = "OSF1 Uprava.ev.co.yu V4.0 878 alpha"
>Description:
DEC CC cannot work with C (*.h or *.c) source code which contains indented CPP directives,
such as:

#ifdef THIS_OR_THAT
  #include <some_header.h>
#endif

I have looked at C language specifications and all I could get (K&R c and ANSII C) state
that "#" MUST start in column 1 of the line, the rest of the directive may be indented. Thus,
this would be OK:

#ifdef THIS_OR_THAT
#  include <some_header.h>
#endif
And the above change works.

In Apache, not only "configure" script uses this (APR, detection of INT64_C in <stdint.h>),
but it is present in several instances of source itself.

I can change this by hand, but it gets tiresome after a couple of times.

Is this a GNU CC speciality or is it a new part of C Language specification?

In other words, should I bother you or Compaq?

Nix.
>How-To-Repeat:
Get a DEC CC for Alpha, or try ANSI CC. Unless there was a change in ANSI specification, it
should produce an error or a warning while compiling the simplest example.
>Fix:
Do not indent CPP directives. I know it makes things more readable, but CPP language is not
a part of C language, strictly speaking.

Or at least follow what ANSI says, "keep # in the first column, but indent the rest of the
CPP directive".

Nix.
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 


Mime
View raw message