This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/1051: gcc fails (seg fault) with example code in getopt man page



>Number:         1051
>Category:       c
>Synopsis:       gcc fails (seg fault) with example code in getopt man page
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 12 10:26:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     harry.dolan@intel.com
>Release:        unknown-1.0
>Organization:
>Environment:
Red Hat 7.0
>Description:
Compilation of attached file gives this:


pequod# cc -c opt.c
opt.c: In function `main':
opt.c:13: `optind' undeclared (first use in this function)
opt.c:13: (Each undeclared identifier is reported only once
opt.c:13: for each function it appears in.)
opt.c:15: elements of array `long_options' have incomplete type
opt.c:17: warning: excess elements in struct initializer
opt.c:17: warning: (near initialization for `long_options[0]')
opt.c:17: warning: excess elements in struct initializer
opt.c:17: warning: (near initialization for `long_options[0]')


.....

opt.c:23: warning: excess elements in struct initializer
opt.c:23: warning: (near initialization for `long_options[6]')
opt.c:24: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.


>How-To-Repeat:
cc -c opt.c
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]