Bug 21014

Summary: read-rtl.c:670: warning: missing sentinel in function call
Product: gcc Reporter: John David Anglin <danglin>
Component: middle-endAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, jbglaw
Priority: P2 Keywords: build, diagnostic
Version: 4.1.0   
Target Milestone: ---   
Host: vax-dec-ultrix4.3 Target: vax-dec-ultrix4.3
Build: vax-dec-ultrix4.3 Known to work:
Known to fail: Last reconfirmed: 2005-07-14 00:54:43
Bug Depends on:    
Bug Blocks: 44756    
Attachments: Preprocessed source.

Description John David Anglin 2005-04-14 00:27:22 UTC
stage1/xgcc -Bstage1/ -B/usr/local/gcc/gcc-4.1.0/vax-dec-ultrix4.3/bin/ -c   -g 
-O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
 -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Werror -f
no-common   -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -Ibuild -I../../gcc/gcc -I..
/../gcc/gcc/build -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include  
\
 -o build/read-rtl.o ../../gcc/gcc/read-rtl.c
cc1: warnings being treated as errors
../../gcc/gcc/read-rtl.c: In function 'join_c_conditions':
../../gcc/gcc/read-rtl.c:670: warning: missing sentinel in function call
make[2]: *** [build/read-rtl.o] Error 1

The same error occurs with preprocessed source using x86 cross.
Comment 1 John David Anglin 2005-04-14 00:28:45 UTC
Created attachment 8622 [details]
Preprocessed source.
Comment 2 Andrew Pinski 2005-04-14 00:30:19 UTC
  result = concat ("(", cond1, ") && (", cond2, ")", NULL);


Looks like someone forgot the cast.  (well in most of the time there is a cast, oh well).
Comment 3 dave 2005-04-14 00:46:22 UTC
Subject: Re:  read-rtl.c:670: warning: missing sentinel in function call

>   result = concat ("(", cond1, ") && (", cond2, ")", NULL);
> 
> 
> Looks like someone forgot the cast.  (well in most of the time there is a cast, oh well).

Casts definitely postdate vax-ultrix ;-)  Do we always need a cast in
join_c_conditions?

Dave
Comment 4 dave 2005-04-14 00:58:32 UTC
Subject: Re:  read-rtl.c:670: warning: missing sentinel in function call

> >   result = concat ("(", cond1, ") && (", cond2, ")", NULL);
> > 
> > 
> > Looks like someone forgot the cast.  (well in most of the time there is a cast, oh well).
> 
> Casts definitely postdate vax-ultrix ;-)  Do we always need a cast in
> join_c_conditions?

Looking at /usr/include/sys/_null.h on HP-UX 11.11, it appears that
we only will get a cast if _ANSI_NULL_POINTER is defined.  Since we
don't define this, I'm not sure why this problem doesn't also occur
under HP-UX.

Dave
Comment 5 dave 2005-04-15 22:10:53 UTC
Subject: Re:  read-rtl.c:670: warning: missing sentinel in function call

>   result = concat ("(", cond1, ") && (", cond2, ")", NULL);
> 
> 
> Looks like someone forgot the cast.  (well in most of the time there is a cast, oh well).

It looks like this could be fixed by including stddef.h after stdio.h
in system.h.  stddef.h would then provide an appropriate define for NULL.
Otherwise, stdio.h needs fixing.  The define for NULL in system.h is
also probably inadequate if it's ever needed.

Dave
Comment 6 Eric Gallager 2019-02-07 03:46:42 UTC
(In reply to dave from comment #5)
> Subject: Re:  read-rtl.c:670: warning: missing sentinel in function call
> 
> >   result = concat ("(", cond1, ") && (", cond2, ")", NULL);
> > 
> > 
> > Looks like someone forgot the cast.  (well in most of the time there is a cast, oh well).
> 
> It looks like this could be fixed by including stddef.h after stdio.h
> in system.h.  stddef.h would then provide an appropriate define for NULL.
> Otherwise, stdio.h needs fixing.  The define for NULL in system.h is
> also probably inadequate if it's ever needed.
> 
> Dave

I see <stddef.h> already included in system.h
Comment 7 John David Anglin 2019-02-09 15:37:35 UTC
This doesn't occur anymore.