public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/39381]  New: The warning: anonymous variadic macros were introduced in C99 disapear
@ 2009-03-05 10:23 spam dot spam dot spam dot spam at free dot fr
  2009-03-05 20:09 ` [Bug c/39381] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: spam dot spam dot spam dot spam at free dot fr @ 2009-03-05 10:23 UTC (permalink / raw)
  To: gcc-bugs

Hello,
I get warnings compiling my own C89 project that uses C99 check.h.

If 'check' program is installed in the default path, when I compile my project
:
$ make
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-c ../arbre.c
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-lcheck check_arbre.c arbre.o -o check_arbre
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-c ../sequence.c
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-c ../liste.c
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-lcheck check_sequence.c sequence.o arbre.o liste.o -o check_sequence
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-lcheck check_liste.c liste.o arbre.o -o check_liste

In the second case ('check' program installed in '/tmp/logiciel-check-0.9.6') :
In this case, I use the correct environment variables :
$export LD_LIBRARY_PATH="/tmp/logiciel-check-0.9.6/usr/lib:${LD_LIBRARY_PATH}"
$export LIBRARY_PATH="/tmp/logiciel-check-0.9.6/usr/lib:${LIBRARY_PATH}"
$export CPATH="/tmp/logiciel-check-0.9.6/usr/include:${CPATH}"
and because I am french I add :
$export LANG=en_GB.UTF-8

$ make
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-c ../arbre.c
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-lcheck check_arbre.c arbre.o -o check_arbre
In file included from check_arbre.c:1:
/tmp/logiciel-check-0.9.6/usr/include/check.h:211:27: warning: anonymous
variadic macros were introduced in C99
/tmp/logiciel-check-0.9.6/usr/include/check.h:222:23: warning: anonymous
variadic macros were introduced in C99
/tmp/logiciel-check-0.9.6/usr/include/check.h:227:14: warning: anonymous
variadic macros were introduced in C99
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-c ../sequence.c
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-c ../liste.c
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-lcheck check_sequence.c sequence.o arbre.o liste.o -o check_sequence
In file included from check_sequence.c:1:
/tmp/logiciel-check-0.9.6/usr/include/check.h:211:27: warning: anonymous
variadic macros were introduced in C99
/tmp/logiciel-check-0.9.6/usr/include/check.h:222:23: warning: anonymous
variadic macros were introduced in C99
/tmp/logiciel-check-0.9.6/usr/include/check.h:227:14: warning: anonymous
variadic macros were introduced in C99
gcc -ansi -Wall -W -pedantic -Wmain -Wextra -Wwrite-strings -Wstrict-prototypes
-Wno-missing-braces -Wswitch -Wswitch-default -Wswitch-enum -Wfloat-equal -s
-O2
-lcheck check_liste.c liste.o arbre.o -o check_liste
In file included from check_liste.c:1:
/tmp/logiciel-check-0.9.6/usr/include/check.h:211:27: warning: anonymous
variadic macros were introduced in C99
/tmp/logiciel-check-0.9.6/usr/include/check.h:222:23: warning: anonymous
variadic macros were introduced in C99
/tmp/logiciel-check-0.9.6/usr/include/check.h:227:14: warning: anonymous
variadic macros were introduced in C99

Do you understand why the warnings ARE in one case and ARN'T in the other?
Thank you.


-- 
           Summary: The warning: anonymous variadic macros were introduced
                    in C99 disapear
           Product: gcc
           Version: 4.2.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: spam dot spam dot spam dot spam at free dot fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39381


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c/39381] The warning: anonymous variadic macros were introduced in C99 disapear
  2009-03-05 10:23 [Bug c/39381] New: The warning: anonymous variadic macros were introduced in C99 disapear spam dot spam dot spam dot spam at free dot fr
@ 2009-03-05 20:09 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-03-05 20:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-03-05 20:08 -------
This is because if the header is installed in the system includes directory GCC
does not warn about extensions.

If you want to have /tmp/logiciel-check-0.9.6/usr/include in the system include
directories use -isystem.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39381


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-05 20:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-05 10:23 [Bug c/39381] New: The warning: anonymous variadic macros were introduced in C99 disapear spam dot spam dot spam dot spam at free dot fr
2009-03-05 20:09 ` [Bug c/39381] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).