Bug 8612 - cproto error
Summary: cproto error
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: cproto
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-19 16:24 UTC by santini
Modified: 2014-03-17 02:12 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-02-01 20:44:19 UTC
Embargoed:


Attachments (Terms of Use)

Description santini 2000-01-19 16:24:27 UTC
The cproto command does not work as espected. If any "#include <>"
statement is present in the source file, an error is returned, an easy way
to reproduce the error is:

  bash$ echo "#include <stdio.h>" | cproto -
  /* - */
  "/usr/include/bits/types.h", line 37: syntax error at token 'typedef'

while, if a preprocessor is specified, the error vanishes:

  bash$ echo "#include <stdio.h>" | cproto -E/lib/cpp -
  /* - */

This is strange since, according the manual, /lib/cpp should be the default
value for option -E. The strace of the first executions ends in a SIGSEV:

  ...
  read(3, "\n\n\n \n\n\n\n\n \ntypedef struct\n  {\n  "..., 4096) = 4096
  write(2, "\"/usr/include/bits/types.h\", lin"...,
38"/usr/include/bits/types.h", line 37: ) = 38
  write(2, "syntax error at token \'typedef\'\n", 32syntax error at token
'typedef' ) = 32
  --- SIGSEGV (Segmentation fault) ---
  +++ killed by SIGSEGV +++

Not a big problem (-E/lib/cpp solves it), but somehow annoyng...

	Massimo Santini

P.S.
These are the relevant packages I have installed:
cproto-4.6-2 (containing cproto itself)
glibc-devel-2.1.2-11 (containing the include files)
cpp-1.1.2-24 (containing cpp)

Comment 1 Bill Nottingham 2000-02-01 20:44:59 UTC
Fixed in cproto-4.6-3.


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