URL:
  <https://savannah.gnu.org/bugs/?68404>

                 Summary: Line continuation without whitespace when warnings
flags are enabled
                   Group: make
               Submitter: evincar
               Submitted: Wed 27 May 2026 06:21:15 PM UTC
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Enhancement
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Unlocked
       Component Version: None
        Operating System: None
           Fixed Release: None
           Triage Status: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Wed 27 May 2026 06:21:15 PM UTC By: Jon Purdy <evincar>
The current manual (4.4.1 at the time of this writing) recommends using '$\'
at the end of a line for "Splitting Without Adding Whitespace".

var := one$\
       word

This is very useful for controlling precisely where whitespace is inserted,
but as documented, it relies on the fact that the undefined variable '$ ' has
an empty expansion. Since I want to enable warnings about undefined variables,
I define this variable.

empty:=
space:=$(empty) $(empty)
$(space):=$(empty)

However, I also want to enable warnings about otherwise invalid variable
names, available in recent development versions. So I would suggest one of the
following.
1. Make '$ ' predefined and empty
2. Exempt '$ ' from the invalid name warning
3. Allow selectively disabling this warning for a single variable, or a
restricted scope
4. Add some other facility for line continuations with no whitespace, such as
adopting '$\' as syntax; this could allow preceding whitespace like '\'
outside of POSIX mode







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68404>

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

Attachment: signature.asc
Description: PGP signature

Reply via email to