Menu

#655 primes not an allowed variable id name.

v1.0 (example)
closed-invalid
nobody
None
5
2017-08-23
2017-08-22
No
Mon 08/21/2017|15:08:57.13|T:\projects\1\lib\factor||>g++ -DTEST -static -m64 -o 64\factor.exe factor.cpp
factor.cpp: In function 'VU& MakePrimesUpTo(uint64_t)':
factor.cpp:26:24: warning: reference to local variable 'primes' returned [-Wreturn-local-addr]
  std::vector<uint64_t> primes={1};

VU is vector of uint64_t. what is this about primes? something about gmp? it's consistent between VC++ community edition and g++. ugh, I have nothing that works that allows me to use the id "primes".

Discussion

  • Doug Semler

    Doug Semler - 2017-08-23

    VU is a typedef. The function is returning a reference. Please read my response to your previous invalid bug report.653.. Please read the warning message. Please stop learning C++ by reporting bugs here, use a help group. The identifer name has absolutely NOTHING TO DO WITH THE WARNING.

     
  • niXman

    niXman - 2017-08-23
    • status: open --> closed-invalid
     

Log in to post a comment.