Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 54814 - generates bad prototype for functions returning const pointers
generates bad prototype for functions returning const pointers
Product: Red Hat Linux
Classification: Retired
Component: cproto (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Depends On:
Blocks: FC2Target
  Show dependency treegraph
Reported: 2001-10-19 13:12 EDT by Ian Romanick
Modified: 2014-03-16 22:23 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-05-04 00:55:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ian Romanick 2001-10-19 13:12:47 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012

Description of problem:
cproto generates prototypes of the form:

extern const char * foo( void ) = {0};

for functions of the form

const char * foo( void )
    return( NULL );

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Create a file called x.c with the single line "const char
*foo(void){return (void*)0;}"
2.Run "cproto x.c"


Actual Results:  cproto produced the output:

/* x.c */
const char *foo(void) = {0};

Expected Results:  I expected cproto to produce:

/* x.c */
const char *foo(void);

Additional info:
Comment 1 Thomas E. Dickey 2004-03-20 14:02:04 EST
This doesn't happen for a current version of cproto.
See http://invisible-island.net/cproto/
Comment 2 Bill Nottingham 2004-05-04 00:55:04 EDT
Fixed in 4.7c-1.

Note You need to log in before you can comment on or make changes to this bug.