bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #111048] Add a syntax check to code snippets


From: Collin Funk
Subject: [sr #111048] Add a syntax check to code snippets
Date: Fri, 5 Apr 2024 04:10:26 -0400 (EDT)

Follow-up Comment #2, sr #111048 (group autoconf):

[comment #0 original submission:]
> So the CMake project is considering adding a preliminary syntax check
> (with a verbose error message) in addition to the full check (which
> fails rather silently), so that such disabling does not go unnoticed:

Feel free to correct me if I am missing something, but I don't see how that is
possible.

How would you check for certain compiler extensions which may cause syntax
errors if unsupported?

Something like GCC case ranges:


int
main (void)
{
  switch (2)
    {
    case 0 ... 5:
      return 0;
    default:
      return 1;
    }
}


Would cause a syntax error on other compilers. I don't see a way of
differentiating that from a case like that CMake script.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?111048>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]