Bug 21014 - read-rtl.c:670: warning: missing sentinel in function call
Summary: read-rtl.c:670: warning: missing sentinel in function call
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-14 00:27 UTC by John David Anglin
Modified: 2013-09-13 11:26 UTC (History)
2 users (show)

See Also:
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


Attachments
Preprocessed source. (24.84 KB, text/plain)
2005-04-14 00:28 UTC, John David Anglin
Details

Note You need to log in before you can comment on or make changes to this bug.
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