Message ID | 20230407033702.6770-1-shiyulong@iscas.ac.cn |
---|---|
State | New |
Headers | show |
Series | [V4] RISC-V: Fix a redefinition bug for the fd-4.c | expand |
On 4/6/23 21:37, shiyulong@iscas.ac.cn wrote: > From: yulong <shiyulong@iscas.ac.cn> > > This patch fix a redefinition bug. > There are have a definition about mode_t in the fd-4.c, but it duplicates the definition in types.h that be included by stdio.h. > > gcc/testsuite/ChangeLog: > > * gcc.dg/analyzer/fd-4.c: delete the definition of mode_t. This may not be advisable. I wouldn't be shocked to find out there are systems that do not provide mode_t. Ultimately David Malcolm (on cc) should make the final decision here. It's really not a RISC-V problem. jeff
diff --git a/gcc/testsuite/gcc.dg/analyzer/fd-4.c b/gcc/testsuite/gcc.dg/analyzer/fd-4.c index 994bad84342..9ec015679e9 100644 --- a/gcc/testsuite/gcc.dg/analyzer/fd-4.c +++ b/gcc/testsuite/gcc.dg/analyzer/fd-4.c @@ -13,11 +13,6 @@ int read (int fd, void *buf, int nbytes); #define O_WRONLY 1 #define O_RDWR 2 -typedef enum { - S_IRWXU - // etc -} mode_t; - int creat (const char *, mode_t mode); void
From: yulong <shiyulong@iscas.ac.cn> This patch fix a redefinition bug. There are have a definition about mode_t in the fd-4.c, but it duplicates the definition in types.h that be included by stdio.h. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/fd-4.c: delete the definition of mode_t. --- gcc/testsuite/gcc.dg/analyzer/fd-4.c | 5 ----- 1 file changed, 5 deletions(-)