[patch #8550] AX_OPENMP: Prevent false negative due to -Wunused-variable

Moritz Klammler <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <[email protected]>
URL:
  <http://savannah.gnu.org/patch/?8550>

                 Summary: AX_OPENMP: Prevent false negative due to
-Wunused-variable
                 Project: GNU Autoconf Archive
            Submitted by: moritz_klammler
            Submitted on: Wed 08 Oct 2014 07:39:29 PM GMT
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

If using GCC with CFLAGS='-Wall -Wextra -Werror', the macro AX_OPENMP will
trigger a fatal compiler warning about an unused local variable which will
erroneously be taken as a sign that the compiler has no OpenMP support.  The
attached patch fixes this by moving the OpenMP code into a function that is
called from main.

I have also run autoupdate over the macro.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 08 Oct 2014 07:39:29 PM GMT  Name: ax_openmp.m4  Size: 4kB   By:
moritz_klammler

<http://savannah.gnu.org/patch/download.php?file_id=32247>
-------------------------------------------------------
Date: Wed 08 Oct 2014 07:39:29 PM GMT  Name: ax_openmp.m4.patch  Size: 1kB  
By: moritz_klammler

<http://savannah.gnu.org/patch/download.php?file_id=32248>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8550>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.