Opened 10 years ago

Closed 6 years ago

Last modified 6 years ago

#7353 closed Bugs (fixed)

no newline at end of file

Reported by: habdank@… Owned by: Joel de Guzman
Milestone: To Be Determined Component: fusion
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc: ttanner2@…

Description (last modified by viboes)

Dears,

Some Boost packages causes flood of warnings "no newline at end of file" on gcc compiler.

As example:

Line 15773: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp:21:7: warning: no newline at end of file
	Line 15788: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp:21:7: warning: no newline at end of file
	Line 15800: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp:21:7: warning: no newline at end of file
	Line 15815: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp:21:7: warning: no newline at end of file
	Line 15830: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp:21:7: warning: no newline at end of file
	Line 15845: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp:21:7: warning: no newline at end of file
	Line 15860: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp:21:7: warning: no newline at end of file
	Line 15875: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp:21:7: warning: no newline at end of file
	Line 15931: ../../../../externals/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp:21:7: warning: no newline at end of file
	Line 15945: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp:21:7: warning: In file included from ../../../../externals/boost/fusion/tuple/tuple_tie.hpp:18no newline at end of file
	Line 15959: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp:21:7: warning: no newline at end of file
	Line 15973: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple.hpp:21:7: warning: no newline at end of file
	Line 15987: ../../../../externals/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp:21:7: warning: no newline at end of file
	Line 16001: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp:21:7: warning: no newline at end of file
	Line 16015: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple.hpp:21:7: warning: no newline at end of file
	Line 16029: ../../../../externals/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp:21:7: warning: no newline at end of file
	Line 16043: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp:21:7: warning: no newline at end of file
	Line 16057: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple.hpp:21:7: warning: no newline at end of file
	Line 16071: ../../../../externals/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp:21:7: warning: no newline at end of file
	Line 16085: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp:21:7: warning: no newline at end of file
	Line 16099: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple.hpp:21:7: warning: no newline at end of file
	Line 16113: ../../../../externals/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp:21:7: warning: no newline at end of file
	Line 16127: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp:21:7: warning: no newline at end of file
	Line 16141: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple.hpp:21:7: warning: no newline at end of file
	Line 16155: ../../../../externals/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp:21:7: warning: no newline at end of file
	Line 16169: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp:21:7: warning: no newline at end of file
	Line 16183: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple.hpp:21:7: warning: no newline at end of file
	Line 16197: ../../../../externals/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp:21:7: warning: no newline at end of file
	Line 16211: ../../../../externals/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp:21:7: warning: no newline at end of file

Change History (9)

comment:1 by viboes, 10 years ago

Description: modified (diff)

comment:2 by Joel de Guzman, 10 years ago

Resolution: worksforme
Status: newclosed

I can't reproduce this. I looked at the files you mention but I don't see any missing newlines at the end. I looked at the files in both Linux, Mac and Windows. My guess is that you've got a problem when obtaining the source? I'm not sure.

Please investigate further. The problem does is not in Boost, as far as I can tell.

comment:3 by work@…, 10 years ago

Hi, I have the exact same problem.

boost/fusion/tuple/detail/preprocessed/tuple.hpp:21:7: warning: no newline at end of file

I got the source (boost_1_53_0.tar.bz2) from sourceforge. Built an installed standard (./bootstrap.sh --prefx=/my/pfix ; ./b2 install).

I checked the file and it seems to be autogenerated, and really, the last character on the file is the "f" from #endif. Here's the file

/*=============================================================================
    Copyright (c) 2001-2011 Joel de Guzman

    Distributed under the Boost Software License, Version 1.0. (See accompanying
    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

    This is an auto-generated file. Do not edit!
==============================================================================*/
#if FUSION_MAX_VECTOR_SIZE <= 10
#include <boost/fusion/tuple/detail/preprocessed/tuple10.hpp>
#elif FUSION_MAX_VECTOR_SIZE <= 20
#include <boost/fusion/tuple/detail/preprocessed/tuple20.hpp>
#elif FUSION_MAX_VECTOR_SIZE <= 30
#include <boost/fusion/tuple/detail/preprocessed/tuple30.hpp>
#elif FUSION_MAX_VECTOR_SIZE <= 40
#include <boost/fusion/tuple/detail/preprocessed/tuple40.hpp>
#elif FUSION_MAX_VECTOR_SIZE <= 50
#include <boost/fusion/tuple/detail/preprocessed/tuple50.hpp>
#else
#error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers"
#endif

comment:4 by anonymous, 10 years ago

Confirmed. There must've been something wrong with the way the trunk got merged into release. Trunk is just fine. I'll make sure this gets merged correctly when I do the next merge to release.

comment:5 by Tobias Peciva <tobias.peciva@…>, 9 years ago

Resolution: worksforme
Status: closedreopened
Version: Boost 1.50.0Boost 1.55.0

Reopening, as this has still not been resolved. I just pulled down 1.55 (boost_1_55_0.tar.bz2) and built for OS X. Still no newline at end of file.

For reference here is my boost/fusion/tuple/detail/preprocessed/tuple.hpp:

/*=============================================================================
    Copyright (c) 2001-2011 Joel de Guzman

    Distributed under the Boost Software License, Version 1.0. (See accompanying
    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

    This is an auto-generated file. Do not edit!
==============================================================================*/
#if FUSION_MAX_VECTOR_SIZE <= 10
#include <boost/fusion/tuple/detail/preprocessed/tuple10.hpp>
#elif FUSION_MAX_VECTOR_SIZE <= 20
#include <boost/fusion/tuple/detail/preprocessed/tuple20.hpp>
#elif FUSION_MAX_VECTOR_SIZE <= 30
#include <boost/fusion/tuple/detail/preprocessed/tuple30.hpp>
#elif FUSION_MAX_VECTOR_SIZE <= 40
#include <boost/fusion/tuple/detail/preprocessed/tuple40.hpp>
#elif FUSION_MAX_VECTOR_SIZE <= 50
#include <boost/fusion/tuple/detail/preprocessed/tuple50.hpp>
#else
#error "FUSION_MAX_VECTOR_SIZE out of bounds for preprocessed headers"
#endif

Last character is "f", not newline.

And this is my build command, in case it matters:

./bootstrap.sh
./b2 -a toolset=clang cxxflags="-std=c++11" link=static variant=release address-model=64 architecture=x86 threading=multi runtime-link=static --without-math --without-graph --without-wave -sZLIB_SOURCE="../../../../zlib-1.2.7" --stagedir=./Mac106/build/Release stage

comment:6 by Tom Tanner <ttanner2@…>, 8 years ago

Where is this generated from, as this file appears to be in the tar file rather than being rebuilt.

comment:7 by Tom Tanner <ttanner2@…>, 8 years ago

Cc: ttanner2@… added

comment:8 by Kohei Takahashi, 6 years ago

Resolution: fixed
Status: reopenedclosed

I have no OS X machine but it seems already to be fixed. https://github.com/boostorg/fusion/commit/b6142f16133b21ee0c5e9c8ec48646f2654e74b4

comment:9 by habdank@…, 6 years ago

Thanks a lot for fixing it.

EOL at the end of header file is very old requirement which comes from C, but I think it is also better for readability, when the code ends with new line.

Note: See TracTickets for help on using tickets.